diff --git a/src/rules.ts b/src/rules.ts index c9bc07c5d6..997f9be52a 100644 --- a/src/rules.ts +++ b/src/rules.ts @@ -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+|$)/) diff --git a/test/specs/new/blank_line_with_tabs.html b/test/specs/new/blank_line_with_tabs.html new file mode 100644 index 0000000000..83dc66c022 --- /dev/null +++ b/test/specs/new/blank_line_with_tabs.html @@ -0,0 +1,4 @@ +

foo

+

bar

+

baz

+

qux

diff --git a/test/specs/new/blank_line_with_tabs.md b/test/specs/new/blank_line_with_tabs.md new file mode 100644 index 0000000000..a79bd0f899 --- /dev/null +++ b/test/specs/new/blank_line_with_tabs.md @@ -0,0 +1,10 @@ +--- +gfm: false +--- +foo + +bar + +baz + +qux