Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Banner re-inserting itself #47

Closed
ggstrader opened this issue Mar 31, 2022 · 4 comments
Closed

Banner re-inserting itself #47

ggstrader opened this issue Mar 31, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@ggstrader
Copy link

This only seems to happen with daily notes and I'm not sure why. Whenever I navigate away from the note (whether in edit mode or not), a new YAML block gets inserted before the one already there. This new block only contains the banner and nothing else so it seems like this would be the plugin causing it

BannerBug

@ggstrader
Copy link
Author

Almost forgot to update, I found out the issue was links vs paths.
My daily note template had the banner metadata formatted as embed links: banner: "![[wallpaper x]]"
It looks like this function is where the problem starts, as links are apparently not recognized but full paths are. It looks like it also has an issue if there's any whitespace before the YAML block

@noatpad
Copy link
Owner

noatpad commented Apr 14, 2022

Ah yeah, that function was added in there because I changed how the banner "source" field was parsed, & it was gonna pretty much affect everyone. So this patch was gonna discreetly change it to the new format to make things easier, though it looks like it has a bug in it. Does it still happen if you enclose the banner field value in quotes, so something like banner: value to banner: "value"?

@noatpad noatpad added the bug Something isn't working label Apr 14, 2022
@noatpad
Copy link
Owner

noatpad commented Apr 14, 2022

Actually I think I've found the problem and it is the spaces before the frontmatter causing it, so I'll be putting out a fix for that later today with the release

@noatpad
Copy link
Owner

noatpad commented Apr 14, 2022

Just put up the release with the fix, so feel free to try it out and see if it's all working for ya!
https://github.com/noatpad/obsidian-banners/releases/tag/1.3.2

@noatpad noatpad closed this as completed Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants