src/JsRender/NodeToVala.vala
authorAlan Knowles <alan@roojs.com>
Tue, 19 May 2015 06:38:17 +0000 (14:38 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 19 May 2015 06:38:17 +0000 (14:38 +0800)
src/JsRender/NodeToVala.vala

index 5b67257..dbf3007 100644 (file)
@@ -66,7 +66,10 @@ public class JsRender.NodeToVala : Object {
                node.line_end  = this.cur_line;
                node.lines = new Gee.ArrayList<int>();
                node.line_map = new Gee.HashMap<int,string>();
-                
+               if (parent == null) {
+                       node.node_lines = new Gee.ArrayList<int>();
+                       node.node_line_map = new Gee.HashMap<int,Node>();
+                }
                
        }
 
@@ -196,7 +199,7 @@ public class JsRender.NodeToVala : Object {
                var l = this.cur_line;
                this.cur_line += str.split("\n").length;
                //this.ret +=  "/*%d*/ ".printf(l) + str + "\n";
-               this.ret +=   str + "\n";
+               this.ret +=   str + "\n";
        }