fix: fix unexpected setext heading (#2986)

This commit is contained in:
Tony Brix
2023-09-15 13:22:12 -06:00
committed by GitHub
parent 0743d4adb4
commit bcc3067087
3 changed files with 21 additions and 1 deletions
+1 -1
View File
@@ -87,7 +87,7 @@ export const block: Record<BlockRuleNames, Rule> & Record<BlockSubRuleNames, Rul
+ ')',
def: /^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,
table: noopTest,
lheading: /^((?:(?!^bull ).|\n(?!\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
lheading: /^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
// regex template, placeholders will be replaced according to different paragraph
// interruption rules of commonmark and the original markdown spec:
_paragraph: /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,
+9
View File
@@ -0,0 +1,9 @@
<p>a</p>
<p>b</p>
<p>=</p>
<p>a</p>
<p>b</p>
<ul>
<li></li>
</ul>
+11
View File
@@ -0,0 +1,11 @@
a
b
=
a
b
-