Browse Source

tools: add links to the stability index reference

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: https://github.com/nodejs/node/pull/11664
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
v7.x
Michael Cox 8 years ago
committed by Italo A. Casas
parent
commit
5e7baa5a72
No known key found for this signature in database GPG Key ID: 23EFEFE93C4CFFFE
  1. 5
      tools/doc/html.js

5
tools/doc/html.js

@ -352,9 +352,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;
}

Loading…
Cancel
Save