Open ahan98 opened 1 year ago
Pretty sure this is intended behavior. The first \ is to escape the } in the hsnips language. Then you need to escape it again so regex spits it in the snippet language, then you regularly escape it inside your regex. Triple escape.
This is also how it works in json (for the Conceal extension).
The escaped backslash does not appear in the snippet return value
\\}
.Minimal example:
latex.hsnips
file.tex
, typefoo
\}
, Received:}
To actually output
\}
, the RHS needs to be\\\\}
.Also, the error does not occur for: space-separated
\\ }
; individual characters\\
or}
; other braces, e.g.,\\{
.