summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-09-16 14:15:55 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-09-16 14:15:55 -0700
commita2a6b7dd829bd7097aa52f5af7fbd66dd7e2c667 (patch)
treeb98bd649135493195713eadf7cdb32a1974cc8a6 /js
parente9f5a586938b926da932a9e957f801281dde4730 (diff)
Fixed bug in parsing `* **a** b*` etc.
Diffstat (limited to 'js')
-rwxr-xr-xjs/stmd.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/js/stmd.js b/js/stmd.js
index 9c84268..157fe5f 100755
--- a/js/stmd.js
+++ b/js/stmd.js
@@ -428,9 +428,10 @@
second)}];
} else if (res.numdelims === 1 && res.can_close) {
this.pos += 1;
- return [{t: 'Str', c: c+c}].concat(
- first,
- [{t: 'Emph', c: second}]);
+ first = first.concat([{t: 'Emph', c: second}]);
+ current = first;
+ state = 2;
+ continue;
}
break;
case 9: // *a **b
@@ -441,9 +442,10 @@
c: second}])}];
} else if (res.numdelims === 2 && res.can_close) {
this.pos += 2;
- return [{t: 'Str', c: c}].concat(
- first,
- [{t: 'Strong', c: second}]);
+ first = first.concat([{t: 'Strong', c: second}]);
+ current = first;
+ state = 3;
+ continue;
} else if (res.numdelims === 1 && res.can_close) {
this.pos += 1;
return [{t: 'Emph',