summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2014-09-07 07:52:27 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2014-09-07 07:52:27 -0700
commit3c89f2660280266d9d82cf398b2ff9ba5d693fff (patch)
tree0b6d46259167f4b9c27df0b03ac644e7c752c097
parent76e133cafe0f45e44c57e391c67af1c2f0057004 (diff)
Partially address #48 in js parser.
TODO: C parser, add test case to spec.
-rwxr-xr-xjs/stmd.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/js/stmd.js b/js/stmd.js
index 29e4c01..13bdbd6 100755
--- a/js/stmd.js
+++ b/js/stmd.js
@@ -346,6 +346,13 @@ var parseEmphasis = function(inlines) {
// giving us <strong><em>
res.numdelims = 1;
}
+
+ if (first_close_delims === 1) {
+ res.numdelims = 2;
+ } else if (first_close_delims === 2) {
+ res.numdelims = 1;
+ }
+
this.pos += res.numdelims;
if (first_close > 0) { // if we've already passed the first closer: