projects
/
gnome.introspection-doc-generator
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JSDOC/CompressWhite.js
[gnome.introspection-doc-generator]
/
JSDOC
/
CompressWhite.js
diff --git
a/JSDOC/CompressWhite.js
b/JSDOC/CompressWhite.js
index
293c318
..
86ef6fa
100644
(file)
--- a/
JSDOC/CompressWhite.js
+++ b/
JSDOC/CompressWhite.js
@@
-8,9
+8,9
@@
@arg packer {Packer}
*/
@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;
ts.rewind();
//var str = File.read(fn);
var rep_var = 1;
@@
-21,6
+21,7
@@
CompressWhite = function (ts, packer)
break;
}
if (tok.type == "WHIT") {
break;
}
if (tok.type == "WHIT") {
+
continue;
//if (tok._isDoc) {
// continue;
continue;
//if (tok._isDoc) {
// continue;
@@
-270,9
+271,13
@@
CompressWhite = function (ts, packer)
var outoff = 0;
out.length = ts.slen; // prealloc.
out = '';
var outoff = 0;
out.length = ts.slen; // prealloc.
out = '';
+ var tok;
while (true) {
while (true) {
- var tok = ts.nextTok();
-
+
+ tok = keepWhite ? ts.next() : ts.nextTok();
+ if (tok.type == "COMM") {
+ tok.outDate == '\n';
+ }
if (!tok) {
break;
}
if (!tok) {
break;
}