…tch too
Its three siblings in this file (collectParserFunctionsFromNode,
collectTemplateParametersFromNode, collectTemplatesFromNodeTransitive) all
continue recursing into a matched nodes own children after adding it, so
a nested instance (e.g. a template inside a template) is still found.
collectInternalLinksFromNode alone stopped at the first match, so a link
nested inside another links own label/children (e.g.
"[[A|see also [[B]]]]") only ever yielded A, never B.
Made it recurse into the matched nodes children too, matching the
established pattern of the other three collectors in this same file.
ExtractorUtils.collectInternalLinksFromNodeis the odd one out among its three siblings in thisfile (
collectParserFunctionsFromNode,collectTemplateParametersFromNode,collectTemplatesFromNodeTransitive): all three of those continue recursing into a matchednode's own children after collecting it, so a nested instance (e.g. a template inside a
template) is still found.
collectInternalLinksFromNodestopped at the first match instead, so alink nested inside another link's own label/children — for example
[[A|see also [[B]]]]— onlyever yielded
A, neverB.Fix: recurse into the matched node's children too, matching the established pattern of the
other three collectors in this same file.
Summary by CodeRabbit