From 99450139d6c41d6c8d6bc02b0d2fd825be4c6dbb Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Sat, 17 Jan 2015 16:51:19 -0800
Subject: Moved place where we increment line number.

---
 js/lib/blocks.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'js/lib')

diff --git a/js/lib/blocks.js b/js/lib/blocks.js
index c12be92..60e8ca1 100644
--- 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) {
-- 
cgit v1.2.3