GeezerVison is showing github.com — tools,doc: add "legacy" badge in the TOC · nodejs/node@571afd3
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: doc/api_assets/style.css +8Lines changed: 8 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -515,6 +515,14 @@ hr { |
515 | 515 | padding: 1px 3px; |
516 | 516 | border-radius: 3px; |
517 | 517 | } |
| 518 | +#toc .stability_3::after { |
| 519 | + background-color: var(--blue1); |
| 520 | + color: var(--white); |
| 521 | + content: "legacy"; |
| 522 | + margin-left: .25rem; |
| 523 | + padding: 1px 3px; |
| 524 | + border-radius: 3px; |
| 525 | +} |
518 | 526 |
|
519 | 527 | #apicontent li { |
520 | 528 | margin-bottom: .5rem; |
|
Collapse file
Copy file name to clipboardExpand all lines: tools/doc/html.js +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -234,9 +234,9 @@ function preprocessElements({ filename }) { |
234 | 234 | const [, prefix, number, explication] = |
235 | 235 | text.value.match(STABILITY_RE); |
236 | 236 |
|
237 | | - const isStabilityIndex = |
238 | | - index - 2 === headingIndex || // General. |
239 | | - index - 3 === headingIndex; // With api_metadata block. |
| 237 | + // Stability indices are never more than 3 nodes away from their |
| 238 | + // heading. |
| 239 | + const isStabilityIndex = index - headingIndex <= 3; |
240 | 240 |
|
241 | 241 | if (heading && isStabilityIndex) { |
242 | 242 | heading.stability = number; |
|