Format: fix indent of nested array elements#7450
Merged
straight-shoota merged 1 commit intocrystal-lang:masterfrom Feb 21, 2019
Merged
Format: fix indent of nested array elements#7450straight-shoota merged 1 commit intocrystal-lang:masterfrom
straight-shoota merged 1 commit intocrystal-lang:masterfrom
Conversation
Fixed crystal-lang#7443 With more precision, not nested array elements, but multiline elements. This change detects multiline elenent and keeps current indent in this case, or elements will be aligned at start column.
Member
|
@makenowjust Thank you! I didn't start working on this yet, it was just my intention if it was too hard to implement. But you did it so it's great! |
Contributor
|
You guys are awesome, thanks! 🙇 |
Contributor
|
will this fix #5988? |
Member
|
@kostya I don't think so. However, an idea to fix that is to use the start line and end line of the hash/namedtuple to know what to align. After this is merged I can fix it (or @makenowjust might ^_^) |
asterite
approved these changes
Feb 19, 2019
urde-graven
pushed a commit
to urde-graven/crystal
that referenced
this pull request
Feb 25, 2019
Fixed crystal-lang#7443 With more precision, not nested array elements, but multiline elements. This change detects multiline elenent and keeps current indent in this case, or elements will be aligned at start column.
urde-graven
pushed a commit
to urde-graven/crystal
that referenced
this pull request
Feb 27, 2019
* fixes: Foreign exceptions: basic support Added support for `.so' libraries, fixed segfault, small bugs OptionParser: optional options and arguments shifting XML: workaround for bug in libxml2 2.9.9 (crystal-lang#7477) Implement resource owner credentials (crystal-lang#7424) Implement #annotations (crystal-lang#7326) Handle signals in a separate fiber Compiler: reactively compute a union's type, and check for missing types Compiler: fix as? casting when target doesn't have a type yet Compiler: fix as casting when target doesn't have a type yet Compiler: give pare error when assigning a constant inside a multiassign Format: fix indent of nested array elements (crystal-lang#7450) Disable double write buffering in OpenSSL sockets (crystal-lang#7460)
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.
Fixed #7443
With more precision, this change treats multiline elements.
This change detects multiline elenent and keeps current indent in this case, or elements will be aligned at start column.
Now, the formatter keeps these formats:
@asterite Sorry. I know you are working for #7443 just now. However I wrote this patch yesterday (but I wrote a spec today.)