Skip to content

Commit

Permalink
tools,doc: remove "toc" anchor name
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Trott authored and richardlau committed Sep 1, 2020
1 parent 2fe9509 commit 7ad629e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h1>Node.js __VERSION__ Documentation</h1>
<div id="gtoc">
<ul>
<li>
<a href="index.html" name="toc">Index</a>
<a href="index.html">Index</a>
</li>
<li>
<a href="all.html">View on single page</a>
Expand Down
2 changes: 1 addition & 1 deletion tools/doc/allhtml.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ for (const link of toc.match(/<a.*?>/g)) {

// Replace various mentions of index with all.
let all = toc.replace(/index\.html/g, 'all.html')
.replace('<a href="all.html" name="toc">', '<a href="index.html" name="toc">')
.replace('<a href="all.html">', '<a href="index.html">')
.replace('index.json', 'all.json')
.replace('api-section-index', 'api-section-all')
.replace('data-id="index"', 'data-id="all"')
Expand Down

0 comments on commit 7ad629e

Please sign in to comment.