obsidian-creases icon indicating copy to clipboard operation
obsidian-creases copied to clipboard

solution for broken links to headings

Open berot3 opened this issue 2 years ago • 2 comments

Hi!

lets say I have a text under H1 with a link to H2. I then add %% fold %% to the H2 heading-text.

What happens is a non-working link to a heading that doesn't exit anymore, since Obsidian can't change my link automatically after the heading was renamed.

My Idea was, that for heading the %% fold %% should go under the heading instead of at the end.

Of course this causes a lot of problems, but maybe someone else comes up with a better solution? :D

Another idea of mine was to add it to the yaml instead of the heading-text. But not sure if the crease-plugin could take care of heading-renames in yaml... So yaml could look like this:

---
crease:
  - ## H2
---

berot3 avatar Jul 13 '22 11:07 berot3

As a comment on the yaml option: there probably could be a way if the user renames the heading with a right-click -> Rename Heading.

That can also be a workaround for you in the meantime (to add %% fold %% and let Obsidian handle changing any links to that heading. It becomes really annoying if you change your heading titles often.

etiennepellegrini avatar Nov 30 '22 00:11 etiennepellegrini

Another solution to the original problem would be for Creases to activate the Obsidian functionality that handles heading renames when "Crease the current fold" is invoked. No idea how complex that is to implement, or how much resource it would take to invoke this functionality every time you crease a fold

etiennepellegrini avatar Nov 30 '22 01:11 etiennepellegrini