projects
/
gnome.introspection-doc-generator
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
464361c
)
JSDOC/PrettyPrint.js
author
Alan Knowles
<alan@akbkhome.com>
Tue, 29 Jun 2010 10:29:37 +0000
(18:29 +0800)
committer
Alan Knowles
<alan@akbkhome.com>
Tue, 29 Jun 2010 10:29:37 +0000
(18:29 +0800)
JSDOC/PrettyPrint.js
patch
|
blob
|
history
diff --git
a/JSDOC/PrettyPrint.js
b/JSDOC/PrettyPrint.js
index
13e154a
..
22564a5
100644
(file)
--- a/
JSDOC/PrettyPrint.js
+++ b/
JSDOC/PrettyPrint.js
@@
-40,7
+40,6
@@
function toPretty(str)
return 'keyword';
}
return 'syntax'
return 'keyword';
}
return 'syntax'
-
}
// loop through and print it...?
}
// loop through and print it...?
@@
-56,14
+55,22
@@
function toPretty(str)
if (toks[i].identifier) {
r += '<span class="with-ident2">' +
if (toks[i].identifier) {
r += '<span class="with-ident2">' +
-
htmlescape
(toks[i].data) + '</span>';
+
escapeHTML
(toks[i].data) + '</span>';
continue;
}
continue;
}
- r +=
htmlescape
(toks[i].data).replace(/\n/g, '<BR>');
+ r +=
escapeHTML
(toks[i].data).replace(/\n/g, '<BR>');
}
if (cs.length) r +='</span>';
return '<code class="jsdoc-pretty">'+r+'</code>';
}
}
if (cs.length) r +='</span>';
return '<code class="jsdoc-pretty">'+r+'</code>';
}
+function escapeHTML() {
+ return(
+ this.replace(/&/g,'&').
+ replace(/>/g,'>').
+ replace(/</g,'<').
+ replace(/"/g,'"')
+ );
+};
\ No newline at end of file