Skip to content

Strings with escaped characters are missing double-quotes #2506

@jandubois

Description

@jandubois
yq --version
yq (https://github.com/mikefarah/yq/) version v4.48.1yq -n '.foo = "a\tb"'
foo: a\tb

The output is not correct; backslash escapes only work inside double-quoted strings. The output should have been:

yq -n '.foo = "a\tb"'
foo: "a\tb"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions