Skip to content

Commit

Permalink
tools: add links to the stability index reference
Browse files Browse the repository at this point in the history
This modifies the script that generates the docs
to create a static link from each Stability Index callout bar to
the Stability Index explanations in documentation.html.

PR-URL: nodejs/node#11664
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
  • Loading branch information
michaelcox authored and andrew749 committed Jul 19, 2017
1 parent 78c55ca commit 81fb65a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/doc/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,12 @@ function linkJsTypeDocs(text) {
}

function parseAPIHeader(text) {
const classNames = 'api_stability api_stability_$2';
const docsUrl = 'documentation.html#documentation_stability_index';

text = text.replace(
STABILITY_TEXT_REG_EXP,
'<pre class="api_stability api_stability_$2">$1 $2$3</pre>'
`<pre class="${classNames}"><a href="${docsUrl}">$1 $2</a>$3</pre>`
);
return text;
}
Expand Down

0 comments on commit 81fb65a

Please sign in to comment.