From bc35f17b7bc3ddc82c5c37644a95b66661d19224 Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Sun, 5 Aug 2018 18:44:22 +0300 Subject: [PATCH] tools: do not autolink section to itself Fix a regression in the new doc generation toolchain. PR-URL: https://github.com/nodejs/node/pull/22138 Reviewed-By: Luigi Pinca Reviewed-By: Sam Ruby Reviewed-By: James M Snell Reviewed-By: Benjamin Gruenbaum Reviewed-By: Trivikram Kamat --- tools/doc/html.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/doc/html.js b/tools/doc/html.js index ce137f5d115162..f2be43a38b5d91 100644 --- a/tools/doc/html.js +++ b/tools/doc/html.js @@ -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';