- Commit
- 99450139d6c41d6c8d6bc02b0d2fd825be4c6dbb
- Parent
- c5da0cc4f84211ebefc189771deabfec9e9eb8ed
- Author
- John MacFarlane <jgm@berkeley.edu>
- Date
Moved place where we increment line number.
My personal build of CMark ✏️
Moved place where we increment line number.
1 file changed, 1 insertion, 1 deletion
Status | File Name | N° Changes | Insertions | Deletions |
Modified | js/lib/blocks.js | 2 | 1 | 1 |
diff --git a/js/lib/blocks.js b/js/lib/blocks.js @@ -240,6 +240,7 @@ var incorporateLine = function(ln) { var container = this.doc; this.oldtip = this.tip; this.offset = 0; + this.lineNumber += 1; // replace NUL characters for security if (ln.indexOf('\u0000') !== -1) { @@ -664,7 +665,6 @@ var parse = function(input) { if (this.options.time) { console.timeEnd("preparing input"); } if (this.options.time) { console.time("block parsing"); } for (var i = 0; i < len; i++) { - this.lineNumber += 1; this.incorporateLine(lines[i]); } while (this.tip) {