don't escape \r (carriage return) in character literals
- Dominant language
- Haskell
- Stars
- 1.3k
- Forks
- 148
- PR merge metrics
- No merged PRs in 30d
Description
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!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating elm-format's character-literal escaping logic and any tests covering escape output. Confirm how '\r' is currently rendered, then update the behavior so carriage returns remain '\r' rather than becoming '\x0D'. Add or adjust a regression test showing the expected formatted literal.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elm, haskell
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100