Skip to content

literalString \r\n(CRLF) causes an error #981

Open
@medz

Description

@medz

In literalString, if the EOL is CRLF it will cause incorrect code to be generated. I checked the source code and found that literalString only handles the \n LF case, but did not notice the commonly used \r\n CRLF under Windows.

Example 1:

literalString('a\r\nb\r\nc');

Outout:

a
\nb
\nc

example 2:

literalString('a\nb\nc');

Outout:

a\nb\nc

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions