PLAT-9652: tmpl: fix link tag usage in see tags #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using an
@link
tag inside an@see
tag, if the link path is in the formatmodule:<path>
, the template doesn't parse it correctly, so it ends up like this:The problem is the full text is being passed to
linkto
instead of just the path. It slips through all the conditional checks and reaches the endreturn
statement, which tries to convert it to a short name usinggetShortName
, but this ends up splitting it by the colon aftermodule
and returning the popped result.This PR checks if the
@see
text includes@link
and uses the full link text directly instead of passing it tolinkto
.Testing this change locally will require updating the template package code in your core repo's
node_modules
, and adding an@see
tag somewhere as described above. For example, inbase/browser.js
:This becomes important in enh/PLAT-9652_fix_api_docs_links where I've added
@see
tags with@link
, and updatedjsdoc-plugin-typescript
to include this change: openlayers/jsdoc-plugin-typescript#66.