ansible-role-yedit icon indicating copy to clipboard operation
ansible-role-yedit copied to clipboard

Backslashes get escaped

Open tdmalone opened this issue 4 years ago • 0 comments

Given this YAML passed to yedit:

exclude_lines:
- ^\s*(\(|\))\s*$
- ^\s+$

I end up with the following result:

exclude_lines:
- ^\\s*(\\(|\\))\\s*$
- ^\\s+$

This, naturally, breaks the regular expression that I am trying to provide in this particular value.

I get the same result if I wrap the values in single-quotes. If I wrap the values in double quotes, it's a YAML syntax error (unless I escape the slashes myself, in which case, the end result is still the same).

Is there a way I can provide a blackslash to yedit without it being escaped for me?

tdmalone avatar Sep 03 '19 06:09 tdmalone