You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that the plugin overtriggers a lot when copy and pasting code, which has become more frustrating as I've started to use the Templater and Dataview plugins more.
After playing around with the regex tester on https://regexr.com, I found that the default fallback regex would match many function calls or object references. For example, the fairly straight forward templater expression <% tp.date.now(fmt_month, 0, tp.file.title, fmt_week) %> actually matches twice – once on tp.date.now(fmt_month and a second time on tp.file.title. While the second match is more understandable, as it could technically be a real URL with a weird TLD, I think that a fallback expression should not be prone to overtriggering.
As a less sensitive option, I'm suggesting that ((\w+:\/\/)[-a-zA-Z0-9:@;?&=\/%\+\.\*!'\(\),\$_\{\}\^~\[\]#|]+)` be used at the default fall back regex. In my (albeit brief) testing, I've found this to be much less prone to overtriggering and overall less frustrating to use copy and paste in my notes when working with templates and queries.
The text was updated successfully, but these errors were encountered:
I've noticed that the plugin overtriggers a lot when copy and pasting code, which has become more frustrating as I've started to use the Templater and Dataview plugins more.
After playing around with the regex tester on https://regexr.com, I found that the default fallback regex would match many function calls or object references. For example, the fairly straight forward templater expression
<% tp.date.now(fmt_month, 0, tp.file.title, fmt_week) %>
actually matches twice – once ontp.date.now(fmt_month
and a second time ontp.file.title
. While the second match is more understandable, as it could technically be a real URL with a weird TLD, I think that a fallback expression should not be prone to overtriggering.As a less sensitive option, I'm suggesting that
((\w+:\/\/)[-a-zA-Z0-9:@;?&=\/%\+\.\*!'\(\),\$_\{\}\^~\[\]
#|]+)` be used at the default fall back regex. In my (albeit brief) testing, I've found this to be much less prone to overtriggering and overall less frustrating to use copy and paste in my notes when working with templates and queries.The text was updated successfully, but these errors were encountered: