Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Fix multiline paragraph rendering as single line #7210

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down