Skip to content

Commit

Permalink
tools: fix stability table generation for docs
Browse files Browse the repository at this point in the history
Multi-line top-level stability indices were not working.

Refs: https://github.com/nodejs/node/pull/45335/files#r1014868777
  • Loading branch information
Trott committed Nov 6, 2022
1 parent d5b1604 commit 3762422
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/doc/stability.mjs
Expand Up @@ -48,6 +48,10 @@ function createMarkdownTable(data) {
const md = ['| API | Stability |', '| --- | --------- |'];

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

Expand Down

0 comments on commit 3762422

Please sign in to comment.