X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=blobdiff_plain;f=JSDOC%2FPrettyPrint.js;h=3101f30749db1b0a177bbc5dc04a79ef0d00dbbd;hp=1f99003e663aeb5240d87ffc1e5b815a82d822ad;hb=HEAD;hpb=01741d040d0903397d9c0e4f04d790cc3098a2ad diff --git a/JSDOC/PrettyPrint.js b/JSDOC/PrettyPrint.js index 1f99003..3101f30 100644 --- a/JSDOC/PrettyPrint.js +++ b/JSDOC/PrettyPrint.js @@ -3,27 +3,32 @@ TokenReader = imports.TokenReader.TokenReader; ScopeParser= imports.ScopeParser.ScopeParser; -TokenStream = imports.TokenStream.TokenStream; +Collapse = imports.Collapse.Collapse; +TextStream = imports.TextStream.TextStream; + -function escapeHTML() { - return( - this.replace(/&/g,'&'). - replace(/>/g,'>'). - replace(//g,'>'). + replace(/"); - r == "
"; + //r += sp.warnings.join("
"); + //r == "
"; @@ -42,7 +47,7 @@ function toPretty(str) return 'string'; } // other 'vary things?? - if (tok.is('NAME') || tok.data == '.' || tok.name == 'THIS')) { + if (tok.is('NAME') || tok.data == '.' || tok.name == 'THIS') { return 'var'; } if (/^[a-z]+/i.test(tok.data)) { @@ -68,9 +73,10 @@ function toPretty(str) continue; } - r += escapeHTML(toks[i].data).replace(/\n/g, '
'); + r += escapeHTML(toks[i].data); //.replace(/\n/g, "
\n"); } if (cs.length) r +=''; + return ''+r+'';