0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-27 15:52:39 +00:00

Flag Table of Contents as "Experimental"

This commit is contained in:
David Bolack
2024-05-22 21:04:32 -05:00
parent 0df53daa4c
commit 7cef4316d7
2 changed files with 10 additions and 8 deletions

View File

@@ -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',

View File

@@ -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') {