I want the possibility of transforming an inline equation in latex to a display equation.
So I want
$something$ to become
$$ something $$
My attempt was this:
snippet "$(.+)$" "whatever" r $$ \1 $$ $1 endsnippet
My understanding is that
(.+) would match any character 1 or more times (captured in a group), and
\1 would print the match in the group.
I also tried using python interpolation with
!p snip.rv = match.group(1) to no success either.
Both attempt just lead to a tab inserted. Any ideas?