Skip to content

Line continuation character inside string macros does not continue lines #55885

Open
@thchr

Description

The @lazy_str macro behaves differently from ordinary strings when using the line continuation character \:

lstr = lazy"hello \
       world"       # == "hello \\\n       world"
str  = "hello \
       world"       # == "hello world"

Apart from interpreting the line-continuation character as a "raw" backslash (and consequently also inserting a line-break), lazy"..." also doesn't ignore the white-space on the following line. This seems unintended and undesirable.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions