summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xjs/stmd.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/js/stmd.js b/js/stmd.js
index fab3a51..1b82fd5 100755
--- a/js/stmd.js
+++ b/js/stmd.js
@@ -299,7 +299,8 @@ var parseEmphasis = function() {
res = this.scanDelims(c);
numclosedelims = res.numdelims;
if (res.can_close) {
- if (last_emphasis_closer < this.pos) {
+ if (last_emphasis_closer === null ||
+ last_emphasis_closer < this.pos) {
last_emphasis_closer = this.pos;
}
if (numclosedelims === 3 && delims_to_match === 3) {