mirror of
https://github.com/markedjs/marked.git
synced 2026-11-30 16:48:05 +01:00
fix: treat a line of only tabs as a blank line between paragraphs (#4007)
This commit is contained in:
+1
-1
@@ -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+|$)/)
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<p>foo</p>
|
||||
<p>bar</p>
|
||||
<p>baz</p>
|
||||
<p>qux</p>
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
gfm: false
|
||||
---
|
||||
foo
|
||||
|
||||
bar
|
||||
|
||||
baz
|
||||
|
||||
qux
|
||||
Reference in New Issue
Block a user