noatpad / obsidian-banners

An Obsidian plugin that adds banners to your notes
MIT License
616 stars 39 forks source link

What happens to legacy documents that use [[filename]] in banner: #117

Closed korm closed 11 months ago

korm commented 12 months ago

What happens to legacy documents that use [[filename]] in `banner:'? Are banners going to be broken in all those documents (hundreds in my case)?

noatpad commented 12 months ago

So as of now, the legacy syntax ("![[filename]]") will no longer work in favor of the new syntax ("[[filename]]"); reason being that this is handled better natively in 1.4 (no more edge cases in parsing it and auto-updates when the filename changes).

However, I want to implement a system in place to update the syntax automatically throughout all files (it's quite literally just the ! that needs to be removed from the field value). Still figuring out what's the best way to along doing this, but I am thinking along the lines of "detect a file with legacy syntax -> prompt to scan all files for the legacy banner syntax and update it"

korm commented 12 months ago

Makes sense, thank's Danny -- I misread the release note and see that this is not a big deal. With 1.4.x we can globally replace ![[ with [[ in properties, but if you can handle this in the upgrade it would be helpful.

noatpad commented 11 months ago

Just as a note, there's now a helper modal at the bottom of the settings tab for this in https://github.com/noatpad/obsidian-banners/releases/tag/2.0.1-beta, so that should help to facilitate it in the future