From 72c4ff6ec7e8269b51a83a105206baf0ff626a4d Mon Sep 17 00:00:00 2001 From: Renan Date: Fri, 26 Nov 2021 18:22:09 -0300 Subject: [PATCH] Fix multiline paragraph rendering as single line Signed-off-by: Renan --- src/Markdown.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Markdown.ts b/src/Markdown.ts index 96169d4011d..4adc450fca2 100644 --- a/src/Markdown.ts +++ b/src/Markdown.ts @@ -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;