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

does not render color in title names #8

Closed zeltak closed 1 year ago

zeltak commented 1 year ago

Hi and thx for this amazing plugin!

it does not seem to render any color (in html) in the heading names, ie

[travel.Taiwan.2023-09-14](app://obsidian.md/index.html#travel.Taiwan.2023-09-14)
[Visit summary](app://obsidian.md/index.html#Visit%20summary)
[<span style="background:#5ed3ff;color:#ffffff">Sites 🗽</span>](app://obsidian.md/index.html#%3Cspan%20style=%22background:#5ed3ff;color:#ffffff%22%3ESites%20%F0%9F%97%BD%3C/span%3E)
[<span style="background:#00de79;color:#ffffff">Dishes 🌶️</span>](app://obsidian.md/index.html#%3Cspan%20style=%22background:#00de79;color:#ffffff%22%3EDishes%20%F0%9F%8C%B6%EF%B8%8F%3C/span%3E)
[<span style="background:#05aa5e;color:#ffffff">Food 🍳</span>](app://obsidian.md/index.html#%3Cspan%20style=%22background:#05aa5e;color:#ffffff%22%3EFood%20%F0%9F%8D%B3%3C/span%3E)
[<span style="background:#ff0066;color:#ffffff">Calander 📅</span>](app://obsidian.md/index.html#%3Cspan%20style=%22background:#ff0066;color:#ffffff%22%3ECalander%20%F0%9F%93%85%3C/span%3E)
[<span style="background:#ffda36;color:#ffffff">Notes 🗒️</span>](app://obsidian.md/index.html#%3Cspan%20style=%22background:#ffda36;color:#ffffff%22%3ENotes%20%F0%9F%97%92%EF%B8%8F%3C/span%3E)
[<span style="background:#ff00ff;color:#ffffff">Bike 🚲</span>](app://obsidian.md/index.html#%3Cspan%20style=%22background:#ff00ff;color:#ffffff%22%3EBike%20%F0%9F%9A%B2%3C/span%3E)
Visit summary
Sites 🗽

is this a bug or is that an inherit limitation in obsidian ?

thx!

Z

johansatge commented 1 year ago

Hey! Looks like an Obsidian limitation; with this title:

## <span style="background:#5ed3ff;color:#ffffff">Sites 🗽</span>

the autocomplete when creating an internal link doesn't handle HTML:

and the generated link doesn't either:

[[#<span style="background 5ed3ff;color ffffff">Sites 🗽</span>]]