elm-format icon indicating copy to clipboard operation
elm-format copied to clipboard

don't escape \r (carriage return) in character literals

Open Zinggi opened this issue 7 years ago • 1 comments

This is a minor issue, but I think it's very weird that elm-format escapes '\r' to '\x0D'. I had to add a comment to my parser that used '\r' to explain what the hell '\x0D' means. Interestingly enough, it allowed me to keep the \r inside the comment...

Sorry if this issue was already reported, but it's very hard to search for \r...



Thanks for elm-format, I'm loving it!

Zinggi avatar Apr 29 '17 16:04 Zinggi

Adding my experience at @avh4's request:

This rule is making it a little difficult to write clear docs for https://package.elm-lang.org/packages/BrianHicks/elm-csv/latest/. You can see \u{000D} in some of the examples in Csv.Decode (along with a comment explaining what that is.) It only shows up somewhere because elm-format is also not formatting 100% of the example code blocks for whatever reason. 🤷

BrianHicks avatar Feb 03 '21 14:02 BrianHicks