JSDOC/TokenReader.vala
authorAlan Knowles <alan@roojs.com>
Tue, 15 Sep 2015 09:16:58 +0000 (17:16 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 15 Sep 2015 09:16:58 +0000 (17:16 +0800)
JSDOC/TokenReader.vala

index 15d6319..a60dccb 100644 (file)
@@ -332,12 +332,13 @@ namespace JSDOC {
             if (this.collapseWhite) {
                 found = "\n";
             }
-             if (this.keepWhite) {
-                var last = tokens ? tokens.pop() : false;
-                if (last && last.name != "WHIT") {
+            
+            if (this.keepWhite) {
+                var last = tokens.pop();
+                if (last != null && last.name != "WHIT") {
                     tokens.push(last);
                 }
-                
+                // replaces last new line... 
                 tokens.push(new Token(found, "WHIT", "NEWLINE", line));
             }
             return true;