mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 05:35:04 +08:00
Fix multiline paragraph rendering as single line (#7210)
This commit is contained in:
parent
35d4ec6e80
commit
d939e45d00
@ -56,6 +56,12 @@ function isAllowedHtmlTag(node: commonmark.Node): boolean {
|
||||
function isMultiLine(node: commonmark.Node): boolean {
|
||||
let par = node;
|
||||
while (par.parent) {
|
||||
// commonmark Parser separate quotes with blank quoted lines between them with
|
||||
// paragraphs, so we need to consider it when the markdown is only a multiline quote.
|
||||
if (par.type === 'block_quote') {
|
||||
break;
|
||||
}
|
||||
|
||||
par = par.parent;
|
||||
}
|
||||
return par.firstChild != par.lastChild;
|
||||
|
Loading…
Reference in New Issue
Block a user