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

Commit

Permalink
Fix multiline paragraph rendering as single line (#7210)
Browse files Browse the repository at this point in the history
  • Loading branch information
renancleyson-dev authored Nov 29, 2021
1 parent 35d4ec6 commit d939e45
Showing 1 changed file with 6 additions and 0 deletions.
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

0 comments on commit d939e45

Please sign in to comment.