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

Inline tags dont work without a trailing space #286

Closed
seizedengine opened this issue Oct 25, 2024 · 1 comment
Closed

Inline tags dont work without a trailing space #286

seizedengine opened this issue Oct 25, 2024 · 1 comment
Labels
p1 High

Comments

@seizedengine
Copy link

seizedengine commented Oct 25, 2024

First, thank you for the great plugin, it is helping with some planning for a big trip!

This is on Obsidian 1.7.3, flatpak on Linux. Map View is 5.0.3.

While setting it up I did run into an issue with a marker not displaying and realized it is due to the inline tag needing a trailing space or newline before its picked up.

First, no tag, no trailing space or newline
image

The default marker is shown as expected
image

Now add an inline tag that has a custom icon, note no space or newline after `tag:Campground'
image

image

Default marker is still used
image

Add a single space (or newline) after the tag and it works
image

image

Adding another tag that has its own marker, but without the trailing space
image

image

First tag still displayed
image

And adding a space (or newline as is this case)
image

Works
image

I did notice that for a tag already configured with a custom marker that it auto completes and adds a space, so if I type in tag:DontGo then hit enter to choose it from the auto complete drop down then a space is added. But if I type in tag:DontGoHere and then click elsewhere on the note to skip using auto complete then a space isnt (cant be) added and now the marker wont appear.

Similarly if I add a tag that does not have a custom marker configuration then auto complete doesnt apply, so typing tag:New where that tag doesnt have a custom marker config BUT is a previously used tag then auto complete also doesnt kick in and no space is added.

So for the actual request, I am not sure of the best approach but one of these?
Pick up inline tags without a trailing space or newline so they are used properly as markers
OR
Any time an inline tag: is populated, add a space at the end automatically with auto complete, even if the tag doesnt have a custom marker config (which seems to be the criteria for auto complete to kick in?)

The first option would also cover off accidentally removing the space while removing an old tag so that might be preferable? Unless the auto complete logic can always apply to ensure there is a space at the end of a tag:.

And again, thank you for the excellent plugin!

@esm7 esm7 added the p1 High label Nov 13, 2024
@esm7
Copy link
Owner

esm7 commented Jan 22, 2025

Fixed in 5.5.0.

@esm7 esm7 closed this as completed Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p1 High
Projects
None yet
Development

No branches or pull requests

2 participants