Skip to content

Commit 5f1440d

Browse files
asteriteRX14
authored andcommittedJan 9, 2018
Formatter: fix bug regarding backslash (#5194)
1 parent 77db65a commit 5f1440d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
 

Diff for: ‎spec/compiler/formatter/formatter_spec.cr

+1
Original file line numberDiff line numberDiff line change
@@ -1095,6 +1095,7 @@ describe Crystal::Formatter do
10951095
assert_format "1 \\\nrescue 2", "1 \\\n rescue 2"
10961096
assert_format "1 \\\nensure 2", "1 \\\n ensure 2"
10971097
assert_format "foo bar, \\\nbaz", "foo bar,\n baz"
1098+
assert_format "x 1, \\\n 2", "x 1,\n 2"
10981099

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

Diff for: ‎src/compiler/crystal/tools/formatter.cr

+1-1
Original file line numberDiff line numberDiff line change
@@ -2405,8 +2405,8 @@ module Crystal
24052405
write " "
24062406
end
24072407
end
2408-
skip_space_or_newline
24092408
end
2409+
skip_space_or_newline
24102410
end
24112411
end
24122412

0 commit comments

Comments
 (0)
Please sign in to comment.