From bdc1832063f2a2391503a0cd10ed05395a7959f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Sat, 2 Mar 2024 16:09:29 +0100 Subject: [PATCH] improve ToC handling --- .eleventy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eleventy.js b/.eleventy.js index d80c5ab..f2c962a 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -185,7 +185,7 @@ module.exports = config => { elements.forEach(element => { const heading = element.querySelector('h2, h3'); - if (heading && heading.textContent !== 'Example(s)' && heading.textContent !== 'Argument(s)' && heading.textContent !== 'References') { + if (heading && ! ['Example(s)', 'Argument(s)', 'References'].includes(heading.textContent)) { toc += `
  • ${heading.textContent}
  • `; } });