Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expansion of \t in strings #63

Closed
rycee opened this issue Mar 5, 2020 · 3 comments
Closed

Expansion of \t in strings #63

rycee opened this issue Mar 5, 2020 · 3 comments
Labels
low-prio Fixing this is not a goal/priority right now

Comments

@rycee
Copy link
Member

rycee commented Mar 5, 2020

Description

The \t form of tab characters in strings are expanded to a literal tab character. The result could be confused for space characters.

Small example input

"a\tb"

Expected output

"a\tb"

Actual output

"a	b"
@Lucus16
Copy link
Contributor

Lucus16 commented Mar 6, 2020 via email

@rycee
Copy link
Member Author

rycee commented Mar 7, 2020

Yeah, I think normalizing the formatting of tabs is a good idea. I don't have a very strong opinion in this instance since I so rarely encounter tabs in Nix strings.

Instead of different behavior depending on where the tab is in the string I think it would be best to have a very simple rule saying that \t is always expanded (i.e. to keep the existing behavior) or tabs are always contracted to \t. I'm slightly in favor of always contracting to \t for legibility reasons but I would not protest keeping the existing behavor.

@yorickvP yorickvP added the low-prio Fixing this is not a goal/priority right now label Feb 25, 2022
@piegamesde
Copy link
Member

The RFC format states that string content should be preserved without doing any normalization. This is implemented as part of #118

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low-prio Fixing this is not a goal/priority right now
Projects
None yet
Development

No branches or pull requests

4 participants