mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
12 lines
403 B
JavaScript
12 lines
403 B
JavaScript
/**
|
|
@overview Converts the text of a doclet's description, from MarkDown to HTML.
|
|
*/
|
|
|
|
var plugin = require('jsdoc/plugin'),
|
|
markdown = require('markdown/lib/markdown'); // TODO: allow rhino to use commonjs module id here
|
|
|
|
plugin.manager.on('doclet', function(doclet) {
|
|
if (typeof doclet.description === 'string') {
|
|
doclet.description = markdown.toHTML(doclet.description);
|
|
}
|
|
}); |