src/JsRender/NodeToVala.vala
authorAlan Knowles <alan@roojs.com>
Tue, 19 May 2015 05:40:51 +0000 (13:40 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 19 May 2015 05:40:51 +0000 (13:40 +0800)
src/JsRender/NodeToVala.vala

index ba61a96..8a7304f 100644 (file)
@@ -190,7 +190,13 @@ public class JsRender.NodeToVala : Object {
                this.cur_line++;
                this.ret += str + "\n";
        }
-       
+       public void addMultiLine(string str= "")
+       {
+               this.cur_line++;
+               this.cur_line += str.split("\n").length;
+               this.ret += str + "\n";
+       }
+       addMultiLine
        
        public void globalVars()
        {
@@ -690,7 +696,7 @@ public class JsRender.NodeToVala : Object {
                this.addLine();
                this.addLine(ipad + "// init method");
                this.addLine();
-               this.addMultiLine(ipad + this.padMultiline(ipad, this.node.get("init")) );;
+               this.addMultiLine(ipad + this.padMultiline(ipad, this.node.get("init")) );
 
         }
         void addListeners()