Use prefix for TableOfContents filter hrefs
What does this MR do?
It changes anchor hrefs generated by TableOfContents filter if the href consists only from digits.
Another option would be to ignore links with attribute aria-hidden
and class anchor
in the AbstractReferenceFilter. But I'm inclined to this solution because it has slightly better performance (no need for extra element check on every render call) and it doesn't rely on presence of specific class/attribute. This should be backward compatible because if fixes only anchors which were not working until now.
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
digit-only hrefs are recognized as issue hrefs - see #38473 (closed)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Review
-
Has been reviewed by UX -
Has been reviewed by Frontend -
Has been reviewed by Backend -
Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
Internationalization required/considered
What are the relevant issue numbers?
Edited by Jan Provaznik