UNPKG
dox
Version:
latest (1.0.0)
1.0.0
0.9.1
0.9.0
0.8.1
0.8.0
0.7.1
0.7.0
0.6.1
0.6.0
0.5.3
0.5.2
0.5.1
0.5.0
0.4.6
0.4.5
0.4.4
0.4.3
0.4.2
0.4.1
0.4.0
0.3.3
0.3.2
0.3.1
0.3.0
0.2.0
0.1.3
0.1.2
0.1.1
0.1.0
0.0.5
0.0.4
0.0.3
Markdown / JSdoc documentation generator
github.com/tj/dox
visionmedia/dox
dox
/
lib
/
utils.js
15 lines
(13 loc)
•
249 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/** * Escape the given `html`. * *
@param
{
String
}
html
*
@return
{
String
} *
@api
private
*/
exports
.
escape
=
function
(
html
){
return
String
(html) .
replace
(
/&(?!\w+;)/g
,
'&'
) .
replace
(
/</g
,
'<'
) .
replace
(
/>/g
,
'>'
); };