fix: broaden dead-link stripping to cover plain-text links#605
Merged
Conversation
The regex previously only matched <a> tags wrapping <code> content.
Links from JSDoc {@link} references render as plain text and were
missed — 26 broken links remained on openui5/1.149 after regeneration.
Changes:
- Widen the regex from (<code>[^<]+</code>) to ([\s\S]*?) so it
catches any link content (plain text, code, or mixed).
- Add pattern for namespaces/sap/README.html — the non-existent
global sap namespace index page that some pages link to.
All sap.ui.* global functions documented there are either deprecated
or irrelevant for TypeScript users (sap.ui.define/require), so
stripping these links is correct.
codeworrior
previously approved these changes
Jun 22, 2026
petermuessig
approved these changes
Jun 22, 2026
Member
Author
|
Resulting changes: c934bbb#diff-d549aadcb80a84247500f29547856dc1d65ca3876694573769ba5aa87ad332d7 The other versions were unlinked because I deleted the version files... will come back. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
After the previous broken-link fixes were merged and the site regenerated, 26 links remained broken on openui5/1.149. All were plain-text links from JSDoc
{@link sap.ui.view view factory}-style references.The dead-link stripping regex only matched
<a>tags wrapping<code>content:Fix
(<code>[^<]+</code>)to([\s\S]*?)— catches any link content/namespaces/sap/README.htmlto the dead-link patterns — the globalsapnamespace index page doesn't exist and all its members (sap.ui.define,sap.ui.require, plus 28 deprecated functions) are either irrelevant for TypeScript users or deprecatedResult
Reduces broken links from 26 → 1 (the trivial
../parent escape from index.html).