From 5fded26e9e386ce275176d7c9457c7dd02e22dc3 Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Sun, 5 Aug 2018 18:44:22 +0300 Subject: 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(-) (limited to 'tools') diff --git a/tools/doc/html.js b/tools/doc/html.js index ce137f5d11..f2be43a38b 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'; -- cgit v1.2.1