mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 02:05:45 +03:00
comment out broken logic for stripping p tags & bump dep
This commit is contained in:
parent
079b1238a1
commit
95bfface99
2 changed files with 11 additions and 2 deletions
|
@ -86,7 +86,7 @@
|
||||||
"slate": "^0.33.4",
|
"slate": "^0.33.4",
|
||||||
"slate-react": "^0.12.4",
|
"slate-react": "^0.12.4",
|
||||||
"slate-html-serializer": "^0.6.1",
|
"slate-html-serializer": "^0.6.1",
|
||||||
"slate-md-serializer": "matrix-org/slate-md-serializer#926a4c7",
|
"slate-md-serializer": "matrix-org/slate-md-serializer#1635f37",
|
||||||
"sanitize-html": "^1.14.1",
|
"sanitize-html": "^1.14.1",
|
||||||
"text-encoding-utf-8": "^1.0.1",
|
"text-encoding-utf-8": "^1.0.1",
|
||||||
"url": "^0.11.0",
|
"url": "^0.11.0",
|
||||||
|
|
|
@ -102,6 +102,7 @@ export default class Markdown {
|
||||||
// (https://github.com/vector-im/riot-web/issues/3154)
|
// (https://github.com/vector-im/riot-web/issues/3154)
|
||||||
softbreak: '<br />',
|
softbreak: '<br />',
|
||||||
});
|
});
|
||||||
|
/*
|
||||||
const real_paragraph = renderer.paragraph;
|
const real_paragraph = renderer.paragraph;
|
||||||
|
|
||||||
renderer.paragraph = function(node, entering) {
|
renderer.paragraph = function(node, entering) {
|
||||||
|
@ -114,16 +115,21 @@ export default class Markdown {
|
||||||
real_paragraph.call(this, node, entering);
|
real_paragraph.call(this, node, entering);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
renderer.html_inline = html_if_tag_allowed;
|
renderer.html_inline = html_if_tag_allowed;
|
||||||
|
|
||||||
renderer.html_block = function(node) {
|
renderer.html_block = function(node) {
|
||||||
|
/*
|
||||||
// as with `paragraph`, we only insert line breaks
|
// as with `paragraph`, we only insert line breaks
|
||||||
// if there are multiple lines in the markdown.
|
// if there are multiple lines in the markdown.
|
||||||
const isMultiLine = is_multi_line(node);
|
const isMultiLine = is_multi_line(node);
|
||||||
|
|
||||||
if (isMultiLine) this.cr();
|
if (isMultiLine) this.cr();
|
||||||
|
*/
|
||||||
html_if_tag_allowed.call(this, node);
|
html_if_tag_allowed.call(this, node);
|
||||||
|
/*
|
||||||
if (isMultiLine) this.cr();
|
if (isMultiLine) this.cr();
|
||||||
|
*/
|
||||||
};
|
};
|
||||||
|
|
||||||
return renderer.render(this.parsed);
|
return renderer.render(this.parsed);
|
||||||
|
@ -150,6 +156,7 @@ export default class Markdown {
|
||||||
this.lit(s);
|
this.lit(s);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
renderer.paragraph = function(node, entering) {
|
renderer.paragraph = function(node, entering) {
|
||||||
// as with toHTML, only append lines to paragraphs if there are
|
// as with toHTML, only append lines to paragraphs if there are
|
||||||
// multiple paragraphs
|
// multiple paragraphs
|
||||||
|
@ -159,10 +166,12 @@ export default class Markdown {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
renderer.html_block = function(node) {
|
renderer.html_block = function(node) {
|
||||||
this.lit(node.literal);
|
this.lit(node.literal);
|
||||||
if (is_multi_line(node) && node.next) this.lit('\n\n');
|
if (is_multi_line(node) && node.next) this.lit('\n\n');
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
// convert MD links into console-friendly ' < http://foo >' style links
|
// convert MD links into console-friendly ' < http://foo >' style links
|
||||||
// ...except given this function never gets called with links, it's useless.
|
// ...except given this function never gets called with links, it's useless.
|
||||||
|
|
Loading…
Reference in a new issue