Nicer way to fix @inheritDoc

This commit is contained in:
ahocevar
2013-04-10 01:45:21 +02:00
parent 2fd185c966
commit 551a5f06ff
+5 -5
View File
@@ -5,12 +5,12 @@
* TODO: Remove this hack when https://github.com/jsdoc3/jsdoc/issues/53 * TODO: Remove this hack when https://github.com/jsdoc3/jsdoc/issues/53
* is addressed. * is addressed.
*/ */
exports.handlers = { exports.nodeVisitor = {
beforeParse: function(e) { visitNode: function(node, e, parser, currentSourceName) {
e.source = e.source.replace( if (/@(inheritDoc|override)(\n|\r)/.test(e.comment)) {
/\/\*\*\r?\n?\s*\* @(inheritDoc|override)\r?\n?\s*\*\/\r?\n?/g, e.preventDefault = true;
"/***\n *\n */\n"); }
} }
}; };