0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-26 18:12:40 +00:00

Trim space off of ToC entries.

This commit is contained in:
David Bolack
2024-03-25 16:32:03 -05:00
parent 7ca10ff5a4
commit 40d0e7e90e

View File

@@ -70,7 +70,7 @@ const getTOC = ()=>{
const ToCExclude = getComputedStyle(heading).getPropertyValue('--TOC');
if(ToCExclude != 'exclude') {
if(!isNaN(onPage)) {
const headingText = heading.innerText;
const headingText = heading.innerText.trim();
if(heading.tagName == 'H1') {
add1(headingText, onPage);
}