mrjackphil / obsidian-text-expand

A simple text expand plugin for Obsidian.md
186 stars 12 forks source link

Searches include the content of other `Expander` queries in their results #25

Closed SkepticMystic closed 3 years ago

SkepticMystic commented 3 years ago

I use this plugin to list all notes with a given tag in their content.

For example, one note might look like this:

Note 1

{{tags: #Tag1}}

[[Note 2]] [[Note 3]]


End of Note

See how this note does not have the tag #Tag1 like it would normally be used (Only in the search query). But if, in another note, I have the same search query:

{{tags: #DifferentTag}}

The results will include Note 1 because it does have #DifferentTag in it's content. Is there a way to prevent this? Possibly to not read tags inside code blocks, or specifically inside search queries?

mrjackphil commented 3 years ago

@SkepticMystic I believe what tag: #Tag1 should exclude all tags inside of code blocks Your example shows tags: #Tag1 with additional S letter.

SkepticMystic commented 3 years ago

I see, that works! Thank you answering so quickly