Skip to content

Commit 5f961a2

Browse files
committed
tools: fix stability table generation for docs
Multi-line top-level stability indices were not working. Refs: https://github.com/nodejs/node/pull/45335/files#r1014868777
1 parent 5484bab commit 5f961a2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/doc/stability.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ function createMarkdownTable(data) {
4848
const md = ['| API | Stability |', '| --- | --------- |'];
4949

5050
for (const mod of data) {
51+
// Remove extra text after stability index.
52+
if (mod.stabilityText) {
53+
mod.stabilityText = mod.stabilityText.replace(/(\(\d\) \w+)[\s\S]*/m, '$1');
54+
}
5155
md.push(`| [${mod.displayName}](${mod.link}) | ${mod.stabilityText} |`);
5256
}
5357

0 commit comments

Comments
 (0)