X Tutup
The Wayback Machine - https://web.archive.org/web/20230218093656/https://github.com/nodejs/node/commit/571afd3c30
Skip to content
Permalink
Browse files
tools,doc: add "legacy" badge in the TOC
PR-URL: #37949
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
aduh95 authored and targos committed May 1, 2021
1 parent 35a382e commit 571afd3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
@@ -515,6 +515,14 @@ hr {
padding: 1px 3px;
border-radius: 3px;
}
#toc .stability_3::after {
background-color: var(--blue1);
color: var(--white);
content: "legacy";
margin-left: .25rem;
padding: 1px 3px;
border-radius: 3px;
}

#apicontent li {
margin-bottom: .5rem;
@@ -234,9 +234,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;

0 comments on commit 571afd3

Please sign in to comment.
X Tutup