Comparing version 0.0.0 to 0.1.0
@@ -798,9 +798,22 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | ||
var opt = { | ||
gfm: true, | ||
converters: [{ | ||
filter: 'span', | ||
filter: ['span', 'div', 'small', 'font'], | ||
replacement: function (content) { | ||
return content | ||
} | ||
}, | ||
{ | ||
filter: 'li', | ||
replacement: function (content, node) { | ||
content = content.replace(/^\s+/, '').replace(/\n/gm, '\n ') | ||
var parent = node.parentNode | ||
var index = Array.prototype.indexOf.call(parent.children, node) + 1 | ||
var prefix = /ol/i.test(parent.nodeName) ? index + '. ' : '- ' | ||
return prefix + content | ||
} | ||
}] | ||
} | ||
inputEl.onkeydown = inputEl.onkeyup = debounce(function() { | ||
@@ -807,0 +820,0 @@ var newVal = inputEl.innerHTML |
15
index.js
@@ -16,9 +16,22 @@ var toMarkdown = require('to-markdown') | ||
var opt = { | ||
gfm: true, | ||
converters: [{ | ||
filter: 'span', | ||
filter: ['span', 'div', 'small', 'font'], | ||
replacement: function (content) { | ||
return content | ||
} | ||
}, | ||
{ | ||
filter: 'li', | ||
replacement: function (content, node) { | ||
content = content.replace(/^\s+/, '').replace(/\n/gm, '\n ') | ||
var parent = node.parentNode | ||
var index = Array.prototype.indexOf.call(parent.children, node) + 1 | ||
var prefix = /ol/i.test(parent.nodeName) ? index + '. ' : '- ' | ||
return prefix + content | ||
} | ||
}] | ||
} | ||
inputEl.onkeydown = inputEl.onkeyup = debounce(function() { | ||
@@ -25,0 +38,0 @@ var newVal = inputEl.innerHTML |
{ | ||
"name": "downmark", | ||
"version": "0.0.0", | ||
"version": "0.1.0", | ||
"description": "editor that turns rich text into markdown", | ||
@@ -9,3 +9,4 @@ "main": "index.js", | ||
"scripts": { | ||
"build": "browserify . -o bundle.js" | ||
"bundle": "sed '/<script src=\"bundle.js\"><\\/script>/{ s/.*/<script>/; r bundle.js\na</script>\n}' index.html > bundle.html", | ||
"prepublish": "browserify . -o bundle.js" | ||
}, | ||
@@ -12,0 +13,0 @@ "devDependencies": { |
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
22360
5
745
1
21