Skip to content

Commit 7ad629e

Browse files
Trottrichardlau
authored andcommitted
tools,doc: remove "toc" anchor name
The _name_ attribute is obsolete. Changing it to _id_ in the case of "toc" would result in a conflict with an existing id. However, there are no links to "#toc" in our docs. And if there were, it would be more appropriate to link to the id toc which is the toc for the individual documents. So remove the anchor name entirely. PR-URL: #34893 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent 2fe9509 commit 7ad629e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

doc/template.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ <h1>Node.js __VERSION__ Documentation</h1>
2727
<div id="gtoc">
2828
<ul>
2929
<li>
30-
<a href="index.html" name="toc">Index</a>
30+
<a href="index.html">Index</a>
3131
</li>
3232
<li>
3333
<a href="all.html">View on single page</a>

tools/doc/allhtml.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ for (const link of toc.match(/<a.*?>/g)) {
4949

5050
// Replace various mentions of index with all.
5151
let all = toc.replace(/index\.html/g, 'all.html')
52-
.replace('<a href="all.html" name="toc">', '<a href="index.html" name="toc">')
52+
.replace('<a href="all.html">', '<a href="index.html">')
5353
.replace('index.json', 'all.json')
5454
.replace('api-section-index', 'api-section-all')
5555
.replace('data-id="index"', 'data-id="all"')

0 commit comments

Comments
 (0)