Skip to content

Commit

Permalink
Formatter: fix bug regarding backslash (#5194)
Browse files Browse the repository at this point in the history
  • Loading branch information
asterite authored and RX14 committed Jan 9, 2018
1 parent 77db65a commit 5f1440d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions spec/compiler/formatter/formatter_spec.cr
Expand Up @@ -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) ->)"

Expand Down
2 changes: 1 addition & 1 deletion src/compiler/crystal/tools/formatter.cr
Expand Up @@ -2405,8 +2405,8 @@ module Crystal
write " "
end
end
skip_space_or_newline
end
skip_space_or_newline
end
end

Expand Down

0 comments on commit 5f1440d

Please sign in to comment.