JSDOC/CompressWhite.js
authoralan <alan@alanfast.akbkhome.com>
Mon, 19 Apr 2010 06:55:01 +0000 (14:55 +0800)
committeralan <alan@alanfast.akbkhome.com>
Mon, 19 Apr 2010 06:55:01 +0000 (14:55 +0800)
JSDOC/CompressWhite.js

index 84fc23c..f40eacb 100644 (file)
@@ -73,6 +73,12 @@ CompressWhite =  function (ts, packer)
                 ts.cursor = cu;
                 continue;
             }
+            
+            if (ts.lookTok(1).type == 'NAME' &&  ts.look(1,true).name == "NEWLINE") {
+                // presever linebraek
+                ts.look(0).outData = ts.look(0).data+"\n";
+            }
+            
             // function a () { ... };
                 /*
             if (ts.look(-1).isTypeN(Script.TOKfunction) &&  ts.look(1).isTypeN(Script.TOKlparen)) {