From e8b1ea4ee2a2c05ae4ac477fe4e6610a44b26b21 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Sat, 27 Mar 2021 19:22:03 +0100 Subject: tools,doc: add "legacy" badge in the TOC PR-URL: https://github.com/nodejs/node/pull/37949 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell --- tools/doc/html.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/doc/html.js') diff --git a/tools/doc/html.js b/tools/doc/html.js index 9089ce7e44..671cb4adf6 100644 --- a/tools/doc/html.js +++ b/tools/doc/html.js @@ -265,9 +265,9 @@ function preprocessElements({ filename }) { const [, prefix, number, explication] = text.value.match(STABILITY_RE); - const isStabilityIndex = - index - 2 === headingIndex || // General. - index - 3 === headingIndex; // With api_metadata block. + // Stability indices are never more than 3 nodes away from their + // heading. + const isStabilityIndex = index - headingIndex <= 3; if (heading && isStabilityIndex) { heading.stability = number; -- cgit v1.2.1