Skip to content

Commit 8d0494e

Browse files
DmitrySharabinLeaVerou
authored andcommitted
[markdown] Render text with headings as blocks regardless
1 parent b09b13d commit 8d0494e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

plugins/markdown/plugin.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ function renderCode(code) {
4747
code = code.replace(new RegExp("^" + indent, "gm"), "");
4848
}
4949

50-
return /\r?\n/.test(code.trim())? md.render(code) : md.renderInline(code);
50+
// Text chunks with headings should be rendered as block markdown regardless
51+
return /\r?\n|^\#/.test(code.trim())? md.render(code) : md.renderInline(code);
5152
}
5253

5354
function render(e) {

0 commit comments

Comments
 (0)