Escaping backslashes in Live Templates

I am trying to define a live template which uses the enum() function to let me choose from a list of possible values when expanding the template. This works very well, except one thing: one of the possble values should include a literal “\n” (i.e. the two-letter-sequence formed by “\” and “n”, not a newline) and I haven’t succeeded in getting this to work yet.

I found out that I can escape a doublequote by escaping it with backslash, but escaping a backslash with a backslash unfortunately does not work.

Any hints?

TIA
Carsten

Please sign in to leave a comment.