From 0275f344ae13b09be13c37ffeb525af067116ff6 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 3 Sep 2014 16:57:45 -0700 Subject: stmd.js: Fixed ATX header parser bug. Don't count an escaped # at the end as a closing string of #s. Closes #16. --- js/stmd.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/stmd.js b/js/stmd.js index 4635b10..16baa59 100755 --- a/js/stmd.js +++ b/js/stmd.js @@ -1064,7 +1064,7 @@ var incorporateLine = function(ln, line_number) { container.level = match[0].trim().length; // number of #s // remove trailing ###s: container.strings = - [ln.slice(offset).replace(/(?:(\\#) *#+| *#+) *$/,'$1')]; + [ln.slice(offset).replace(/(?:(\\#) *#*| *#+) *$/,'$1')]; break; } else if ((match = ln.slice(first_nonspace).match(/^`{3,}(?!.*`)|^~{3,}(?!.*~)/))) { -- cgit v1.2.3