Skip to content

Commit

Permalink
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec/compiler/formatter/formatter_spec.cr
Original file line number Diff line number Diff line change
@@ -1104,6 +1104,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) ->)"

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

0 comments on commit 60f675c

Please sign in to comment.