- Commit
- 2fc6c0d06f4199f4e7ee6fb0e46337bfc6749d24
- Parent
- c11c900b618f6ca48f37ff1bdd2b9602317ec177
- Author
- John MacFarlane <jgm@berkeley.edu>
- Date
Add check for null in last_emphasis_closer.
My personal build of CMark ✏️
Add check for null in last_emphasis_closer.
1 file changed, 2 insertions, 1 deletion
Status | File Name | N° Changes | Insertions | Deletions |
Modified | js/stmd.js | 3 | 2 | 1 |
diff --git 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) {