Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backslashes get escaped #75

Open
tdmalone opened this issue Sep 3, 2019 · 0 comments
Open

Backslashes get escaped #75

tdmalone opened this issue Sep 3, 2019 · 0 comments

Comments

@tdmalone
Copy link
Contributor

tdmalone commented Sep 3, 2019

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant