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

Escape single quotes in a raw string literal #98

Open
eugeneduda opened this issue Dec 5, 2024 · 0 comments
Open

Escape single quotes in a raw string literal #98

eugeneduda opened this issue Dec 5, 2024 · 0 comments

Comments

@eugeneduda
Copy link

eugeneduda commented Dec 5, 2024

I may escape a single quote symbol in a path using \
For instance:

jmespath.search(
        [{ state: "W'A" }, { state: "N'Y" }, { state: "W'A" }, { state: "W'A" }],
        `length([?state == 'W\\'A'])`,
)
// Result: 3

But I can escape only one single quote in a raw string literal.
For instance:

jmespath.search(
        [{ state: "W'A'A" }, { state: "N'Y" }, { state: "W'A'A" }, { state: "W'A'A" }],
        `length([?state == 'W\\'A\\'A'])`,
)
// Result: 0

Expected behaviour:
Ability to escape as many single quotes as you want in a string literal using \ symbol.

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