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: #22138
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sam Ruby <rubys@intertwingly.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information
vsemozhetbyt authored and rvagg committed Aug 15, 2018
1 parent 950a4a9 commit bc35f17
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 bc35f17

Please sign in to comment.