From 551a5f06ff7573f777c2e91a5da742b413e2bb3c Mon Sep 17 00:00:00 2001 From: ahocevar Date: Wed, 10 Apr 2013 01:45:21 +0200 Subject: [PATCH] Nicer way to fix @inheritDoc --- doc/plugins/inheritdoc.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/plugins/inheritdoc.js b/doc/plugins/inheritdoc.js index 56f9a48d71..136bf385c8 100644 --- a/doc/plugins/inheritdoc.js +++ b/doc/plugins/inheritdoc.js @@ -5,12 +5,12 @@ * TODO: Remove this hack when https://github.com/jsdoc3/jsdoc/issues/53 * is addressed. */ -exports.handlers = { +exports.nodeVisitor = { - beforeParse: function(e) { - e.source = e.source.replace( - /\/\*\*\r?\n?\s*\* @(inheritDoc|override)\r?\n?\s*\*\/\r?\n?/g, - "/***\n *\n */\n"); + visitNode: function(node, e, parser, currentSourceName) { + if (/@(inheritDoc|override)(\n|\r)/.test(e.comment)) { + e.preventDefault = true; + } } }; \ No newline at end of file