nothingislost / obsidian-dynamic-highlights

An experimental Obsidian plugin that highlights all occurrences of the word under the cursor
MIT License
132 stars 7 forks source link

FR: Choose Priority if two Regex terms would apply #74

Open ReaderGuy42 opened 1 year ago

ReaderGuy42 commented 1 year ago

I love your plugin! I have several highlight triggers. These include ("|“)(.*?)("|”) to highlight everything that's in "quotes" and one \\.+?\} that highlights all my TeX stuff, mostly citations like \footnote{text}

These two have different colors. Would it be possible to introduce a priority system such as having the more important triggers farther up in the list, so these would get higher priority? That way if there is a quote in a footnote, the quote color would be stronger than the footnote color.

Thanks!