From cd71f42b4b57ff326d8318bf4146482e98bc3e53 Mon Sep 17 00:00:00 2001 From: akudev Date: Mon, 22 Jun 2026 16:58:41 +0200 Subject: [PATCH 1/2] fix: broaden dead-link stripping to cover plain-text links MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The regex previously only matched tags wrapping 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 ([^<]+) 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. --- scripts/generate-api-docs/generate.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/generate-api-docs/generate.mjs b/scripts/generate-api-docs/generate.mjs index 478c397d6c..dadc0c542e 100644 --- a/scripts/generate-api-docs/generate.mjs +++ b/scripts/generate-api-docs/generate.mjs @@ -593,10 +593,12 @@ function renderDir(dir) { ); // Strip links whose href points to dead targets (jQuery, QUnit, pseudo-types, nested namespaces) - htmlFixed = htmlFixed.replace(/]*>([^<]+<\/code>)<\/a>/g, (match, href, content) => { + htmlFixed = htmlFixed.replace(/]*>([\s\S]*?)<\/a>/g, (match, href, content) => { if (DEAD_LINK_PATTERNS.some((p) => p.test(href))) return content; // Links with nested namespaces/ segments are always dead TypeDoc artifacts if ((href.match(/\/namespaces\//g) || []).length >= 2) return content; + // Single namespaces/sap/README.html — the global namespace index that doesn't exist + if (/\/namespaces\/sap\/README\.html$/.test(href)) return content; return match; }); From 02c897efa706e3566a853a45a4af230164a06ee9 Mon Sep 17 00:00:00 2001 From: akudev Date: Mon, 22 Jun 2026 17:12:24 +0200 Subject: [PATCH 2/2] chore: add empty changeset --- .changeset/broaden-dead-link-stripping.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .changeset/broaden-dead-link-stripping.md diff --git a/.changeset/broaden-dead-link-stripping.md b/.changeset/broaden-dead-link-stripping.md new file mode 100644 index 0000000000..a845151cc8 --- /dev/null +++ b/.changeset/broaden-dead-link-stripping.md @@ -0,0 +1,2 @@ +--- +---