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 <[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]>
1 parent e152cf7 commit f68b165

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎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)