- commit
- ec0148a0cebf7bb753a77fef353fcd83baec9623
- parent
- bfeeea2de1e6c80f442cb81e7950160ff7e560b3
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2020-10-16 16:21
rm markdown support for comments
Diffstat
| M | static/scss/tree.scss | 8 | +------- |
| M | static/src/template.js | 10 | +--------- |
2 files changed, 2 insertions, 16 deletions
diff --git a/static/scss/tree.scss b/static/scss/tree.scss
@@ -64,11 +64,5 @@ 64 64 65 65 .node__comment { 66 66 padding: $padding;67 -168 -1 > :first-child {69 -1 margin-top: 0;70 -1 }71 -1 > :last-child {72 -1 margin-bottom: 0;73 -1 }-1 67 white-space: pre-wrap; 74 68 }
diff --git a/static/src/template.js b/static/src/template.js
@@ -1,7 +1,4 @@ 1 1 var h = require('preact').h;2 -1 var MarkdownIt = require('markdown-it');3 -14 -1 var md = new MarkdownIt();5 2 6 3 var getVotes = function(nodes, node) { 7 4 if (!node.votes) { @@ -79,12 +76,7 @@ var tplNode = function(nodes, node, ID) { 79 76 h('div', {className: 'node__name bar__item' + (!node.expanded && node.comment ? '' : ' bar__item--grow')}, getName(node)), 80 77 !node.expanded && node.comment && h('div', {className: 'node__preview bar__item bar__item--grow'}, node.comment.substr(0, 100)), 81 78 ]),82 -1 node.expanded && h('div', {83 -1 className: 'node__comment',84 -1 dangerouslySetInnerHTML: {85 -1 __html: md.render(node.comment || ''),86 -1 },87 -1 }),-1 79 node.expanded && h('div', {className: 'node__comment'}, node.comment || ''), 88 80 ]), 89 81 h('ul', { 90 82 className: 'tree',