Skip to content

Commit

Permalink
Remove + on heading regex
Browse files Browse the repository at this point in the history
Unneeded + on regex heading detection after tables and paragraphs
  • Loading branch information
calculuschild committed Feb 11, 2020
1 parent 30ca83b commit ec38dd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ block.html = edit(block.html, 'i')

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

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

0 comments on commit ec38dd1

Please sign in to comment.