Skip to content

Escape single quotes in a raw string literal #98

@eugeneduda

Description

@eugeneduda

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions