JSDOC/Template.js
[gnome.introspection-doc-generator] / JSDOC / CompressWhite.js
index a5a1389..6b08e16 100644 (file)
@@ -32,7 +32,16 @@ CompressWhite =  function (ts, packer)
             
             
         }
-        
+        if (tok.data == "}")  {
+            
+            if (ts.lookTok(1).type == 'NAME' && ts.look(1,true).name == "NEWLINE") {
+            
+                ts.look(0).outData = ts.look(0).data+"\n";
+            }
+            // restore.. 
+            
+            continue;
+        }
         // add semi-colon's where linebreaks are used... - not foolproof yet.!
         if (tok.type == "NAME")  {
             //var tokident = ts.look(-1).data + tok.data + ts.look(1).data +  ts.look(2).data;
@@ -233,7 +242,7 @@ CompressWhite =  function (ts, packer)
     out = '';
     while (true) {
         var tok = ts.nextTok();
-           print(tok.toString());
+           
         if (!tok) {
             break;
         }