From ec38dd1d0b2920bd01ee1d5ee5e89b98acabaa96 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Tue, 11 Feb 2020 11:30:33 -0500 Subject: [PATCH] Remove + on heading regex Unneeded + on regex heading detection after tables and paragraphs --- src/rules.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rules.js b/src/rules.js index 8440665a67..1abc05b8f0 100644 --- a/src/rules.js +++ b/src/rules.js @@ -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') @@ -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]')