From 391b587a1f4325080db74ae370f3f333a95f9369 Mon Sep 17 00:00:00 2001 From: Dario Piotrowicz Date: Sat, 21 Jun 2025 23:15:44 +0100 Subject: [PATCH] doc: fix stability 1.x links excluding the decimal digit --- tools/doc/html.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/doc/html.mjs b/tools/doc/html.mjs index 0ab54d6786579e..3d5c77f188dddb 100644 --- a/tools/doc/html.mjs +++ b/tools/doc/html.mjs @@ -206,10 +206,11 @@ function linkJsTypeDocs(text) { const isJSFlavorSnippet = (node) => node.lang === 'cjs' || node.lang === 'mjs'; +const STABILITY_RE = /(.*:)\s*(\d(?:\.\d)?)([\s\S]*)/; + // Preprocess headers, stability blockquotes, and YAML blocks. export function preprocessElements({ filename }) { return (tree) => { - const STABILITY_RE = /(.*:)\s*(\d)([\s\S]*)/; let headingIndex = -1; let heading = null; @@ -325,7 +326,7 @@ export function preprocessElements({ filename }) { // Insert div with prefix and number node.children.unshift({ type: 'html', - value: `
` + + value: `