From 1705e66be2ac52cef7b6ba2349f1725522427cf9 Mon Sep 17 00:00:00 2001 From: dbolack Date: Sat, 23 Mar 2024 18:57:53 -0500 Subject: [PATCH] Corrections per PR Remove off by one error realted to change in page number detection. Dewrap quotes from exclude screen. --- themes/V3/5ePHB/snippets/tableOfContents.gen.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/themes/V3/5ePHB/snippets/tableOfContents.gen.js b/themes/V3/5ePHB/snippets/tableOfContents.gen.js index c12205c69..d43ff3854 100644 --- a/themes/V3/5ePHB/snippets/tableOfContents.gen.js +++ b/themes/V3/5ePHB/snippets/tableOfContents.gen.js @@ -5,7 +5,7 @@ const getTOC = ()=>{ const add1 = (title, page)=>{ res.push({ title : title, - page : page + 1, + page : page, children : [] }); }; @@ -13,7 +13,7 @@ const getTOC = ()=>{ if(!_.last(res)) add1(null, page); _.last(res).children.push({ title : title, - page : page + 1, + page : page, children : [] }); }; @@ -22,7 +22,7 @@ const getTOC = ()=>{ if(!_.last(_.last(res).children)) add2(null, page); _.last(_.last(res).children).children.push({ title : title, - page : page + 1, + page : page, children : [] }); }; @@ -35,7 +35,7 @@ const getTOC = ()=>{ _.each(headings, (heading)=>{ const onPage = parseInt(heading.closest('.page,.phb').id?.replace(/^p/, '')); const ToCExclude = getComputedStyle(heading).getPropertyValue('--TOC'); - if(ToCExclude != '"exclude"') { + if(ToCExclude != 'exclude') { if(!isNaN(onPage)) { const headingText = heading.innerText; if(heading.tagName == 'H1') {