hipstersmoothie / obsidian-plugin-toc

Create a tables of contents for a note.
286 stars 20 forks source link

Sub-bullets in generated TOC produce invalid links #25

Closed phillipjohnston closed 2 years ago

phillipjohnston commented 2 years ago

When creating a table of contents with sub-bullets, the sub-bullet items are improperly encoded:

- [[#Integrated Circuits|Integrated Circuits]]
    - [[#Integrated Circuits#Processors|Processors]]
    - [[#Integrated Circuits#Timers and Clocks|Timers and Clocks]]
    - [[#Integrated Circuits#Memory|Memory]]

This leads to an invalid link, whereas this is correct:

- [[#Integrated Circuits|Integrated Circuits]]
    - [[#Processors|Processors]]
    - [[#Timers and Clocks|Timers and Clocks]]
    - [[#Memory|Memory]]
phillipjohnston commented 2 years ago

Ah, this is just an issue with the HTML generation plugin I use that was introduced with the change that added the parent heading to the link.