Fix multiline paragraph rendering as single line (#7210)

This commit is contained in:
Renan Cleyson
2021-11-29 07:47:35 -03:00
committed by GitHub
parent 35d4ec6e80
commit d939e45d00

View File

@@ -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;