JsRender/NodeToVala.vala
authorAlan Knowles <alan@roojs.com>
Mon, 1 Sep 2014 09:28:25 +0000 (17:28 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 1 Sep 2014 09:28:25 +0000 (17:28 +0800)
JsRender/NodeToVala.vala

index 4aa5160..427a1fc 100644 (file)
@@ -29,9 +29,11 @@ public class JsRender.NodeToVala : Object {
        
        public NodeToVala( Node node,  int depth, NodeToVala? top) 
        {
+
+               
                this.node = node;
                this.depth = depth;
-               this.inpad = string.nfill(depth*4, ' ');
+               this.inpad = string.nfill(depth > 0 :4 : 0, ' ');
                this.pad = this.inpad + "    ";
                this.ipad = this.inpad + "        ";
                this.cls = node.xvala_cls;