From 7cef4316d78a19ef35ae383cc6cd9b7ad815fc60 Mon Sep 17 00:00:00 2001 From: David Bolack Date: Wed, 22 May 2024 21:04:32 -0500 Subject: [PATCH] Flag Table of Contents as "Experimental" --- themes/V3/5ePHB/snippets.js | 16 +++++++++------- themes/V3/5ePHB/snippets/tableOfContents.gen.js | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/themes/V3/5ePHB/snippets.js b/themes/V3/5ePHB/snippets.js index 0aba0d11e..adcfe95a5 100644 --- a/themes/V3/5ePHB/snippets.js +++ b/themes/V3/5ePHB/snippets.js @@ -21,14 +21,16 @@ module.exports = [ view : 'text', snippets : [ { - name : 'Table of Contents', - icon : 'fas fa-book', - gen : TableOfContentsGen, - subsnippets : [ + name : 'Table of Contents', + icon : 'fas fa-book', + gen : TableOfContentsGen, + experimental : true, + subsnippets : [ { - name : 'Table of Contents', - icon : 'fas fa-book', - gen : TableOfContentsGen, + name : 'Table of Contents', + icon : 'fas fa-book', + gen : TableOfContentsGen, + experimental : true }, { name : 'Include in ToC up to H3', diff --git a/themes/V3/5ePHB/snippets/tableOfContents.gen.js b/themes/V3/5ePHB/snippets/tableOfContents.gen.js index 66aab50bc..c33530bd7 100644 --- a/themes/V3/5ePHB/snippets/tableOfContents.gen.js +++ b/themes/V3/5ePHB/snippets/tableOfContents.gen.js @@ -29,7 +29,7 @@ const getTOC = (pages)=>{ const headerDepth = ['H1', 'H2', 'H3', 'H4', 'H5', 'H6']; _.each(headings, (heading)=>{ - const onPage = parseInt(heading.closest('.page,.phb').id?.replace(/^p/, '')); + const onPage = parseInt(heading.closest('.page').id?.replace(/^p/, '')); const ToCExclude = getComputedStyle(heading).getPropertyValue('--TOC'); if(ToCExclude != 'exclude') {