summaryrefslogtreecommitdiff
path: root/js/stmd.js
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-09-08 15:56:04 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-09-11 11:17:41 -0700
commite829aaf75ff5feb57c9c0f1a0cd260903116752a (patch)
tree8cdf82a696749d2c7fd0f2dcc93725fa1ad51f4a /js/stmd.js
parent9dde9c96a7b7fb9810a60ae65dd2623b03b83da8 (diff)
Handle case with 4+ delimiters in a row.
Spec says to skip these.
Diffstat (limited to 'js/stmd.js')
-rwxr-xr-xjs/stmd.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/js/stmd.js b/js/stmd.js
index cfd5051..4b3d994 100755
--- a/js/stmd.js
+++ b/js/stmd.js
@@ -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;