diff options
author | Antoine du Hamel <duhamelantoine1995@gmail.com> | 2021-03-27 21:22:03 +0300 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2021-04-01 22:31:25 +0300 |
commit | e8b1ea4ee2a2c05ae4ac477fe4e6610a44b26b21 (patch) | |
tree | b8882d79d0e27cb04be47059ff14ae4606b11909 /tools | |
parent | 25e30005b89ceabcb45474c10488edf3a14d5bb3 (diff) |
tools,doc: add "legacy" badge in the TOC
PR-URL: https://github.com/nodejs/node/pull/37949
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/doc/html.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/doc/html.js b/tools/doc/html.js index 9089ce7e443..671cb4adf62 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; |