| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7643ce9 commit 97fbfd8
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -206,10 +206,11 @@ function linkJsTypeDocs(text) { | |||
| 206 | 206 | ||
| 207 | 207 | const isJSFlavorSnippet = (node) => node.lang === 'cjs' || node.lang === 'mjs'; | |
| 208 | 208 | ||
| 209 | + const STABILITY_RE = /(.*:)\s*(\d(?:\.\d)?)([\s\S]*)/; | ||
| 210 | + | ||
| 209 | 211 | // Preprocess headers, stability blockquotes, and YAML blocks. | |
| 210 | 212 | export function preprocessElements({ filename }) { | |
| 211 | 213 | return (tree) => { | |
| 212 | - const STABILITY_RE = /(.*:)\s*(\d)([\s\S]*)/; | ||
| 213 | 214 | let headingIndex = -1; | |
| 214 | 215 | let heading = null; | |
| 215 | 216 | ||
@@ -325,7 +326,7 @@ export function preprocessElements({ filename }) { | |||
| 325 | 326 | // Insert div with prefix and number | |
| 326 | 327 | node.children.unshift({ | |
| 327 | 328 | type: 'html', | |
| 328 | - value: `<div class="api_stability api_stability_${number}">` + | ||
| 329 | + value: `<div class="api_stability api_stability_${parseInt(number)}">` + | ||
| 329 | 330 | (noLinking ? '' : | |
| 330 | 331 | '<a href="documentation.html#stability-index">') + | |
| 331 | 332 | `${prefix} ${number}${noLinking ? '' : '</a>'}` | |
| Back | FazBrowse Home | New Git URL |
0 commit comments