X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=blobdiff_plain;f=JSDOC%2FCompressWhite.js;h=13d6df7d2ffb93c497dcbad5cc57e86ee2abeac4;hp=5c7ffecaae7c5f8835f98f9b892704b684e9d638;hb=6534df3589197eabe11704e9f7a18cff965898f2;hpb=e195a482b2bcc94f988790b2d04bcc0c375f579c diff --git a/JSDOC/CompressWhite.js b/JSDOC/CompressWhite.js index 5c7ffec..13d6df7 100644 --- a/JSDOC/CompressWhite.js +++ b/JSDOC/CompressWhite.js @@ -21,9 +21,7 @@ CompressWhite = function (ts, packer, keepWhite) break; } if (tok.type == "WHIT") { - if (keepWhite) { - ts.look(0).outData = ts.look(0).data; - } + continue; //if (tok._isDoc) { // continue; @@ -273,13 +271,17 @@ CompressWhite = function (ts, packer, keepWhite) var outoff = 0; out.length = ts.slen; // prealloc. out = ''; + var tok; while (true) { - var tok = ts.nextTok(); - + + tok = keepWhite ? ts.next() : ts.nextTok(); + if (!tok) { break; } - + if (tok.name == "COMM") { + tok.outData == '\n'; + } if (tok.type == "NAME" && tok.identifier && tok.identifier.mungedValue && tok.identifier.mungedValue.length) { //f.write(tok.identifier.mungedValue);