fix: treat a line of only tabs as a blank line between paragraphs (#4007)

This commit is contained in:
Sarath Francis
2026-07-13 21:07:06 -06:00
committed by GitHub
parent 39bd884c5f
commit bc2f121456
3 changed files with 15 additions and 1 deletions
+1 -1
View File
@@ -128,7 +128,7 @@ const lheadingGfm = edit(lheadingCore)
.replace(/html/g, / {0,3}<[^\n>]+>\n/) // block html can interrupt
.replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/) // table can interrupt
.getRegex();
const _paragraph = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/;
const _paragraph = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/;
const blockText = /^[^\n]+/;
const _blockLabel = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/;
const def = edit(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/)
+4
View File
@@ -0,0 +1,4 @@
<p>foo</p>
<p>bar</p>
<p>baz</p>
<p>qux</p>
+10
View File
@@ -0,0 +1,10 @@
---
gfm: false
---
foo
bar
baz
qux