diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2014-09-07 08:06:35 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2014-09-07 08:06:35 -0700 |
commit | 2cf0750a7a507eded4cf3c9a48fd1f924d0ce538 (patch) | |
tree | 939702838c48343981e2ca6af7f19c2ed60b166d /js | |
parent | 3c89f2660280266d9d82cf398b2ff9ba5d693fff (diff) |
Fixed #48.
- Fixed js and C code.
- Added two test cases to spec.
Diffstat (limited to 'js')
-rwxr-xr-x | js/stmd.js | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -341,16 +341,15 @@ var parseEmphasis = function(inlines) { res = this.scanDelims(c); if (res.numdelims >= 1 && res.numdelims <= 3 && res.can_close && res.numdelims != first_close_delims) { - if (res.numdelims === 3) { - // If we opened with ***, then we interpret *** as ** followed by * - // giving us <strong><em> - res.numdelims = 1; - } - if (first_close_delims === 1) { + if (first_close_delims === 1 && numdelims > 2) { res.numdelims = 2; } else if (first_close_delims === 2) { res.numdelims = 1; + } else if (res.numdelims === 3) { + // If we opened with ***, then we interpret *** as ** followed by * + // giving us <strong><em> + res.numdelims = 1; } this.pos += res.numdelims; |