X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=JSDOC%2FCompressWhite.js;h=86ef6fad5be8defbd04ae09ae38954a25911a18e;hb=edf4657868d6cbdb8a43e97eb12534b6c9c9ae00;hp=293c3187bb49c37f5bf77d1b60653eee51e46346;hpb=78311bb94a758645c148c3dd19b3f9a99ce4e51d;p=gnome.introspection-doc-generator diff --git a/JSDOC/CompressWhite.js b/JSDOC/CompressWhite.js index 293c318..86ef6fa 100644 --- a/JSDOC/CompressWhite.js +++ b/JSDOC/CompressWhite.js @@ -8,9 +8,9 @@ @arg packer {Packer} */ -CompressWhite = function (ts, packer) +CompressWhite = function (ts, packer, keepWhite) { - + keepWhite = keepWhite || false; ts.rewind(); //var str = File.read(fn); var rep_var = 1; @@ -21,6 +21,7 @@ CompressWhite = function (ts, packer) break; } if (tok.type == "WHIT") { + continue; //if (tok._isDoc) { // continue; @@ -270,9 +271,13 @@ CompressWhite = function (ts, packer) 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.type == "COMM") { + tok.outDate == '\n'; + } if (!tok) { break; }