Skip to content

Setting multiline string with backslash at EOL forces literal multiline string in TOML #7

Description

@pprkut

When I try to set this multiline string:

tomato set foo 'this\
is\
a\
multiline\
string' "file.toml"

tomato generates this TOML:

foo = '''
this\
is\
a\
multiline\
string'''

If I skip the backslashes it generates """ correctly, but for the value to be correct inside ''' quotes the backslash would need to be escaped, ie.

foo = '''
this\\
is\\
a\\
multiline\\
string'''

Somewhere the logic of whether this is a literal string or not seems to go wrong

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