summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-09-10 08:45:24 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-09-11 11:17:41 -0700
commit6df247e24f2b12d6d1440001877967e2f7c90093 (patch)
tree6586555ae93dcb4087df072e5fdc1eada30124b5 /js
parent905b5d4d11cf1e56137fea1e68eb503863f1b113 (diff)
Special-case ***xx*** as strong/em.
Diffstat (limited to 'js')
-rwxr-xr-xjs/stmd.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/js/stmd.js b/js/stmd.js
index aa21335..7c7362e 100755
--- a/js/stmd.js
+++ b/js/stmd.js
@@ -294,12 +294,16 @@ var parseEmphasis = function() {
var delims_to_match = numdelims;
while (true) {
res = this.scanDelims(c);
+ numclosedelims = res.numdelims;
if (res.can_close) {
- if (res.numdelims >= 2 && delims_to_match >= 2) {
+ if (numclosedelims === 3 && delims_to_match === 3) {
+ this.pos += 3;
+ return {t: 'Strong', c: [{t: 'Emph', c: inlines}]};
+ } else if (numclosedelims >= 2 && delims_to_match >= 2) {
delims_to_match -= 2;
this.pos += 2;
inlines = [{t: 'Strong', c: inlines}];
- } else if (res.numdelims >= 1 && delims_to_match >= 1) {
+ } else if (numclosedelims >= 1 && delims_to_match >= 1) {
delims_to_match -= 1;
this.pos += 1;
inlines = [{t: 'Emph', c: inlines}];