summaryrefslogtreecommitdiff
path: root/js/stmd.js
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-09-03 16:57:45 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-09-03 16:57:45 -0700
commit0275f344ae13b09be13c37ffeb525af067116ff6 (patch)
tree48b7f1171932a47b5ebbd73f397d90f1766c5b04 /js/stmd.js
parent25a1a57fe5350a2b89f8d9726b95f8e48fee83d7 (diff)
stmd.js: Fixed ATX header parser bug.
Don't count an escaped # at the end as a closing string of #s. Closes #16.
Diffstat (limited to 'js/stmd.js')
-rwxr-xr-xjs/stmd.js2
1 files changed, 1 insertions, 1 deletions
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,}(?!.*~)/))) {