Inserting literal "\{" via snippets

Hi! I am trying to insert the literal “\{” as a snippet (for LaTeX) but only the “{” ends up getting dispatched.

I adopted this, and tried to followed the code in dev tools, and it looks like it’s in the step below that that the slash disappears. In the argument template, the slash is escaped

but after the call to Snippet.parse, the escaped slashes disappear

If I remove the curly braces (or add a space between the slashes and the curly braces) though, the slashes are retained


I’m just wondering if this is intended and might I be missing something? I also tried increasing the number of slashes and escaping the curly braces but the output is the same

That was a bug—" \\\\{ " should work to create a sting with a backslash before a brace. Attached patch fixes this.

1 Like

That was fast! It works now, thanks!