Nicer way to fix @inheritDoc
This commit is contained in:
@@ -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");
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
Reference in New Issue
Block a user