diff options
author | Michael Cox <cox.michael@gmail.com> | 2017-03-02 15:58:26 -0500 |
---|---|---|
committer | Franziska Hinkelmann <franzih@chromium.org> | 2017-03-09 11:09:39 +0100 |
commit | dd76f5f661fc59958f674e89b4f951bf6a56d179 (patch) | |
tree | 769e398bb86aee3c195c9ddf9a3984eb4244a2a4 /tools/doc | |
parent | 6d16048da634eaf2254250262b9016ab69e1f57b (diff) | |
download | android-node-v8-dd76f5f661fc59958f674e89b4f951bf6a56d179.tar.gz android-node-v8-dd76f5f661fc59958f674e89b4f951bf6a56d179.tar.bz2 android-node-v8-dd76f5f661fc59958f674e89b4f951bf6a56d179.zip |
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>
Diffstat (limited to 'tools/doc')
-rw-r--r-- | tools/doc/html.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/doc/html.js b/tools/doc/html.js index 10b04a1b98..185a666004 100644 --- a/tools/doc/html.js +++ b/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; } |