Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions spec/compiler/formatter/formatter_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -1100,6 +1100,8 @@ describe Crystal::Formatter do
assert_format "1 \\\nensure 2", "1 \\\n ensure 2"
assert_format "foo bar, \\\nbaz", "foo bar,\n baz"
assert_format "x 1, \\\n 2", "x 1,\n 2"
assert_format "begin\n 1 + \\\n 2\n 3\nend"
assert_format "begin\n 1 \\\n + 2\n 3\nend"

assert_format "alias X = ((Y, Z) ->)"

Expand Down
1 change: 1 addition & 0 deletions src/compiler/crystal/tools/formatter.cr
Original file line number Diff line number Diff line change
Expand Up @@ -4327,6 +4327,7 @@ module Crystal
old_indent = @indent
@indent = indent
value = yield
@passed_backslash_newline = false
@indent = old_indent
value
end
Expand Down