Skip to content

Commit

Permalink
Formatter: fix bug regarding backslash (#5194)
Browse files Browse the repository at this point in the history
asterite authored and RX14 committed Jan 9, 2018

Verified

This commit was signed with the committer’s verified signature.
makenowjust Hiroya Fujinami
1 parent 77db65a commit 5f1440d
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions spec/compiler/formatter/formatter_spec.cr
Original file line number Diff line number Diff line change
@@ -1095,6 +1095,7 @@ describe Crystal::Formatter do
assert_format "1 \\\nrescue 2", "1 \\\n rescue 2"
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 "alias X = ((Y, Z) ->)"

2 changes: 1 addition & 1 deletion src/compiler/crystal/tools/formatter.cr
Original file line number Diff line number Diff line change
@@ -2405,8 +2405,8 @@ module Crystal
write " "
end
end
skip_space_or_newline
end
skip_space_or_newline
end
end

0 comments on commit 5f1440d

Please sign in to comment.