jon-heard / obsidian-inline-scripts

Obsidian plugin: Type text shortcuts that expand into javascript generated text.
MIT License
134 stars 4 forks source link

Shortcut swallowing backslash #8

Closed MohrJonas closed 2 years ago

MohrJonas commented 2 years ago

When having a backslash in the text that is supposed to be expanded, it gets "swallowed" and is missing from the capture group Regex example:

^set ((?:\S+\ ?)+)$

Testing text:

set x \pi

Expected content of capture 1: x \pi Actual content: x pi I don't really know why this happens. Maybe it's got to do something with JavaScript's Regex implementation?

jon-heard commented 2 years ago

Sorry for the delay on this. I've been busy with a new update, including the features we spoke of in the prior issue. I'll take a look at this this evening though. I only kind of understand issue, but I expect it'll make sense when I try it out.

jon-heard commented 2 years ago

I just put out a new release which fixes this bug. You can find more info here.