Skip to content

Commit ec38dd1

Browse files
Remove + on heading regex
Unneeded + on regex heading detection after tables and paragraphs
1 parent 30ca83b commit ec38dd1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rules.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ block.html = edit(block.html, 'i')
6969

7070
block.paragraph = edit(block._paragraph)
7171
.replace('hr', block.hr)
72-
.replace('heading', ' {0,3}#{1,6} +')
72+
.replace('heading', ' {0,3}#{1,6} ')
7373
.replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs
7474
.replace('blockquote', ' {0,3}>')
7575
.replace('fences', ' {0,3}(?:`{3,}|~{3,})[^`\\n]*\\n')
@@ -101,7 +101,7 @@ block.gfm = merge({}, block.normal, {
101101

102102
block.gfm.table = edit(block.gfm.table)
103103
.replace('hr', block.hr)
104-
.replace('heading', ' {0,3}#{1,6} +')
104+
.replace('heading', ' {0,3}#{1,6} ')
105105
.replace('lheading', '([^\\n]+)\\n {0,3}(=+|-+) *(?:\\n+|$)')
106106
.replace('blockquote', ' {0,3}>')
107107
.replace('code', ' {4}[^\\n]')

0 commit comments

Comments
 (0)