diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-09-03 16:57:45 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-09-03 16:57:45 -0700 |
commit | 0275f344ae13b09be13c37ffeb525af067116ff6 (patch) | |
tree | 48b7f1171932a47b5ebbd73f397d90f1766c5b04 /js | |
parent | 25a1a57fe5350a2b89f8d9726b95f8e48fee83d7 (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')
-rwxr-xr-x | js/stmd.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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,}(?!.*~)/))) { |