git ssb

6+

cel / downmark



Commit d2da1e4a240525d0319f9bedceffc570047b41bc

Hide all outer HTML of non-markdown-native tags

Charles Lehner committed on 6/14/2016, 3:14:20 AM
Parent: a6da62055a73bcc0ca4d0d94052c6cef7193d73e

Files changed

index.jschanged
index.jsView
@@ -1,6 +1,11 @@
11 var toMarkdown = require('to-markdown')
22
3+// Get just the inner HTML, not the outer HTML
4+toMarkdown.outer = function (node, content) {
5+ return content
6+}
7+
38 function debounce(fn, wait) {
49 var timeout
510 return function() {
611 clearTimeout(timeout)
@@ -14,14 +19,8 @@
1419 var outputText = outputEl.appendChild(document.createTextNode(''))
1520 var opt = {
1621 gfm: true,
1722 converters: [{
18- filter: ['span', 'div', 'small', 'font'],
19- replacement: function (content) {
20- return content
21- }
22- },
23- {
2423 filter: 'li',
2524 replacement: function (content, node) {
2625 content = content.replace(/^\s+/, '').replace(/\n/gm, '\n ')
2726 var parent = node.parentNode

Built with git-ssb-web