Skip to content

Commit bc2f121

Browse files
fix: treat a line of only tabs as a blank line between paragraphs (#4007)
1 parent 39bd884 commit bc2f121

3 files changed

Lines changed: 15 additions & 1 deletion

File tree

‎src/rules.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ const lheadingGfm = edit(lheadingCore)
128128
.replace(/html/g, / {0,3}<[^\n>]+>\n/) // block html can interrupt
129129
.replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/) // table can interrupt
130130
.getRegex();
131-
const _paragraph = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/;
131+
const _paragraph = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/;
132132
const blockText = /^[^\n]+/;
133133
const _blockLabel = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/;
134134
const def = edit(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<p>foo</p>
2+
<p>bar</p>
3+
<p>baz</p>
4+
<p>qux</p>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
gfm: false
3+
---
4+
foo
5+
6+
bar
7+
8+
baz
9+
10+
qux

0 commit comments

Comments
 (0)