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.
This commit is contained in:
Kai Volland
2019-03-12 15:02:14 +01:00
parent c321c90497
commit 72d38fa929

View File

@@ -1,12 +1,8 @@
/* /*
* This is a hack to prevent inheritDoc tags from entirely removing * This is a hack to prevent inheritDoc tags from entirely removing
* documentation of the method that inherits the documentation. * 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) { exports.defineTags = function(dictionary) {
dictionary.defineTag('inheritDoc', { dictionary.defineTag('inheritDoc', {
mustHaveValue: false, mustHaveValue: false,
@@ -96,6 +92,11 @@ exports.handlers = {
incompleteDoclet[key] = candidate[key]; 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;
} }
} }
} }