Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const lheading = edit(lheadingCore)
.replace(/blockCode/g, /(?: {4}| {0,3}\t)/) // indented code blocks can interrupt
.replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/) // fenced code blocks can interrupt
.replace(/blockquote/g, / {0,3}>/) // blockquote can interrupt
.replace(/heading/g, / {0,3}#{1,6}/) // ATX heading can interrupt
.replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/) // ATX heading can interrupt
.replace(/html/g, / {0,3}<[^\n>]+>\n/) // block html can interrupt
.replace(/\|table/g, '') // table not in commonmark
.getRegex();
Expand All @@ -124,7 +124,7 @@ const lheadingGfm = edit(lheadingCore)
.replace(/blockCode/g, /(?: {4}| {0,3}\t)/) // indented code blocks can interrupt
.replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/) // fenced code blocks can interrupt
.replace(/blockquote/g, / {0,3}>/) // blockquote can interrupt
.replace(/heading/g, / {0,3}#{1,6}/) // ATX heading can interrupt
.replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/) // ATX heading can interrupt
.replace(/html/g, / {0,3}<[^\n>]+>\n/) // block html can interrupt
.replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/) // table can interrupt
.getRegex();
Expand Down
3 changes: 3 additions & 0 deletions test/specs/new/lheading_hash_prefix.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<h2>#1 Goals</h2>
<h1>#hashtag</h1>
<h1>####### seven</h1>
8 changes: 8 additions & 0 deletions test/specs/new/lheading_hash_prefix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#1 Goals
---------

#hashtag
===

####### seven
===