diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-09-08 15:56:04 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-09-11 11:17:41 -0700 |
commit | e829aaf75ff5feb57c9c0f1a0cd260903116752a (patch) | |
tree | 8cdf82a696749d2c7fd0f2dcc93725fa1ad51f4a /js/stmd.js | |
parent | 9dde9c96a7b7fb9810a60ae65dd2623b03b83da8 (diff) |
Handle case with 4+ delimiters in a row.
Spec says to skip these.
Diffstat (limited to 'js/stmd.js')
-rwxr-xr-x | js/stmd.js | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -277,6 +277,11 @@ var parseEmphasis = function() { res = this.scanDelims(c); numdelims = res.numdelims; + if (numdelims >= 4) { + this.pos += numdelims; + return {t: 'Str', c: this.subject.slice(startpos, startpos + numdelims)}; + } + if (!res.can_open || numdelims === 0) { this.pos = startpos; return null; @@ -349,7 +354,7 @@ var parseEmphasis = function() { } break; - default: + default: // shouldn't happen } return null; |