johansatge / obsidian-automatic-table-of-contents

💠 An Obsidian plugin to create a table of contents in a note, that updates itself when the note changes
MIT License
146 stars 13 forks source link

Table Renders some titles weirdly #3

Closed Jack-Chronicle closed 1 year ago

Jack-Chronicle commented 1 year ago

Have a " | " character in some titles, and this adds one to the beginning as well

Assuming it's due to how they're parsed(?), but this is a minor bug so feel free to take your time

johansatge commented 1 year ago

Hey! This has been (kind of) fixed in 1.0.6; but I didn't find a way to escape | and such with something that preserves links. Given this title:

# Title with | in the middle

there doesn't seem to be a way to end up with a working link; something like this:

[[#Title with \| in the middle]]

displays:

 in the middle

So for now the plugin replaces special chars with non-breaking ones, which unfortunately breaks the links. But at least the title is displayed correctly, more or less. It's just not clickable.

| -> -
[ -> {
] -> }