JSDOC/PrettyPrint.js
authorAlan Knowles <alan@akbkhome.com>
Tue, 6 Jul 2010 10:43:33 +0000 (18:43 +0800)
committerAlan Knowles <alan@akbkhome.com>
Tue, 6 Jul 2010 10:43:33 +0000 (18:43 +0800)
JSDOC/PrettyPrint.js

index 71cda58..f97d193 100644 (file)
@@ -7,13 +7,12 @@ TokenStream = imports.TokenStream.TokenStream;
 TextStream = imports.TextStream.TextStream;
  
 
-function  escapeHTML() {                                        
-    return(                                                                 
-        this.replace(/&/g,'&amp;').                                         
-            replace(/>/g,'&gt;').                                           
-            replace(/</g,'&lt;').                                           
-            replace(/"/g,'&quot;')                                         
-    );                                                                      
+function  escapeHTML(str) { 
+    return 
+        str.replace(/&/g,'&amp;').
+            replace(/>/g,'&gt;'). 
+            replace(/</g,'&lt;'). 
+            replace(/"/g,'&quot;');
 };
 
 function toPretty(str)