Skip to content

Commit

Permalink
tools: do not autolink section to itself
Browse files Browse the repository at this point in the history
Fix a regression in the new doc generation toolchain.

PR-URL: nodejs#22138
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Sam Ruby <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
  • Loading branch information
vsemozhetbyt committed Aug 8, 2018
1 parent 41ae423 commit 5fded26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/doc/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ function preprocessElements({ filename }) {
}

// Do not link to the section we are already in.
const noLinking = filename === 'documentation' &&
heading !== null && heading.value === 'Stability Index';
const noLinking = filename.includes('documentation') &&
heading !== null && heading.children[0].value === 'Stability Index';

// collapse blockquote and paragraph into a single node
node.type = 'paragraph';
Expand Down

0 comments on commit 5fded26

Please sign in to comment.