mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 12:34:52 +08:00
checking in jsdoc dir so people can generate docs themselves
This commit is contained in:
21
jsdoc-master/plugins/escapeHtml.js
Normal file
21
jsdoc-master/plugins/escapeHtml.js
Normal file
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
@overview Escape HTML tags in descriptions.
|
||||
@module plugins/escapeHtml
|
||||
@author Michael Mathews <micmath@gmail.com>
|
||||
*/
|
||||
|
||||
|
||||
exports.handlers = {
|
||||
/**
|
||||
Translate HTML tags in descriptions into safe entities.
|
||||
Replaces <, & and newlines
|
||||
*/
|
||||
newDoclet: function(e) {
|
||||
if (e.doclet.description) {
|
||||
e.doclet.description = e.doclet.description
|
||||
.replace(/&/g,'&')
|
||||
.replace(/</g,'<')
|
||||
.replace(/\r\n|\n|\r/g, '<br>');
|
||||
}
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user