From 72d38fa9293184cd380187e3dc542a816341b7d6 Mon Sep 17 00:00:00 2001 From: Kai Volland Date: Tue, 12 Mar 2019 15:02:14 +0100 Subject: [PATCH] Fixes missing methods with `@inheritdoc` - This sets ignore to false if a method tagged with inheritdoc has a matching ancestor. It also stops iterating when a match is found. - Outdated TODO is removed, too. --- config/jsdoc/api/plugins/inheritdoc.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/config/jsdoc/api/plugins/inheritdoc.js b/config/jsdoc/api/plugins/inheritdoc.js index e252269bcc..a399ae1007 100755 --- a/config/jsdoc/api/plugins/inheritdoc.js +++ b/config/jsdoc/api/plugins/inheritdoc.js @@ -1,12 +1,8 @@ /* * This is a hack to prevent inheritDoc tags from entirely removing * documentation of the method that inherits the documentation. - * - * TODO: Remove this hack when https://github.com/jsdoc3/jsdoc/issues/53 - * is addressed. */ - exports.defineTags = function(dictionary) { dictionary.defineTag('inheritDoc', { mustHaveValue: false, @@ -92,10 +88,15 @@ exports.handlers = { incompleteDoclet.stability = stability; for (key in candidate) { if (candidate.hasOwnProperty(key) && - keepKeys.indexOf(key) == -1) { + keepKeys.indexOf(key) == -1) { incompleteDoclet[key] = candidate[key]; } } + // We have found a matching parent doc and applied it so we + // don't want to ignore this doclet anymore. + incompleteDoclet.ignore = false; + // We found a match so we can stop break + break; } } }