Skip to content

Add carriage return "\r" to showInvisibles #99

@BPScott

Description

@BPScott

Prettier will format files using the first line-ending it sees. This means that files that use
\r\n as line breaks will keep them.

showInvisibles has conversions for space, \n and \t. It'd be good if it had a replacement for \r as well so report output doesn't look goofy for crlf files as the terminal tries to render the literal carriage return.

Unfortunately I'm not sure what the best solution for this is. There's no character that screams "I'm a carriage return" that I'm aware of. Perhaps ⏎ can be used for \n (as it is now), and a slightly different character can be used for a \r\n combo?

I reckon we can ignore files with just \r line endings (macos 9 lols)

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