Skip to content

Commit f68b165

Browse files
vsemozhetbyttargos
authored andcommitted
tools: do not autolink section to itself
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>
1 parent e152cf7 commit f68b165

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎tools/doc/html.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ function preprocessElements({ filename }) {
226226
}
227227

228228
// Do not link to the section we are already in.
229-
constnoLinking=filename==='documentation'&&
230-
heading!==null&&heading.value==='Stability Index';
229+
constnoLinking=filename.includes('documentation')&&
230+
heading!==null&&heading.children[0].value==='Stability Index';
231231

232232
// collapse blockquote and paragraph into a single node
233233
node.type='paragraph';

0 commit comments

Comments
 (0)