Reformat indented strings to simple strings when appropriate#348
Merged
infinisil merged 1 commit intoNixOS:masterfrom Oct 28, 2025
Merged
Reformat indented strings to simple strings when appropriate#348infinisil merged 1 commit intoNixOS:masterfrom
infinisil merged 1 commit intoNixOS:masterfrom
Conversation
15149da to
f2216b0
Compare
Contributor
|
There's some related discussion in:
Which were all closed because we're hesitant to do syntax transformations. This does fall under that umbrella, but personally I'm not opposed to simple, well defined, limited scope cases like this one. |
infinisil
requested changes
Oct 28, 2025
Member
infinisil
left a comment
There was a problem hiding this comment.
Looking good! Let's also add a test case for this string (as an indented version without the " and \) just to be sure we don't miss anything
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/formatting-team-meeting-2025-10-14/71449/1 |
f2216b0 to
8c2924b
Compare
Converts indented strings to simple strings when they contain no newlines,
quotes, or backslashes. For example: ''hello'' becomes "hello" and
''path/to/file'' becomes "path/to/file".
Also handles escape sequence conversion (''$ -> \$ and ''' -> '') and
updates standard.md to document this behavior.
8c2924b to
52dbbd3
Compare
dyegoaurelio
commented
Oct 28, 2025
This was referenced Jan 8, 2026
Closed
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Converts indented strings to simple strings when they contain no newlines, quotes, or backslashes. For example: ''hello'' becomes "hello" and ''path/to/file'' becomes "path/to/file".
Also handles escape sequence conversion (''$ -> $ and ''' -> '') and updates standard.md to document this behavior.
closes #274