From f830104531fea71747ff0764120e1a3e523aec67 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Wed, 17 Jul 2024 13:59:00 +1200 Subject: [PATCH] Use textContent instead of innerText --- themes/V3/5ePHB/snippets/tableOfContents.gen.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/V3/5ePHB/snippets/tableOfContents.gen.js b/themes/V3/5ePHB/snippets/tableOfContents.gen.js index b212dea36..3aea01735 100644 --- a/themes/V3/5ePHB/snippets/tableOfContents.gen.js +++ b/themes/V3/5ePHB/snippets/tableOfContents.gen.js @@ -35,7 +35,7 @@ const getTOC = (pages)=>{ const ToCExclude = getComputedStyle(heading).getPropertyValue('--TOC'); if(ToCExclude != 'exclude') { - recursiveAdd(heading.innerText.trim(), onPage, headerDepth.indexOf(heading.tagName), res); + recursiveAdd(heading.textContent.trim(), onPage, headerDepth.indexOf(heading.tagName), res); } }); return res;