Skip to content

Commit 8d25c68

Browse files
Update lib/elixir/lib/code/formatter.ex
Co-authored-by: José Valim <[email protected]>
1 parent e14c292 commit 8d25c68

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/elixir/lib/code/formatter.ex

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2438,8 +2438,7 @@ defmodule Code.Formatter do
24382438
end
24392439

24402440
defp escape_atom(string, char) do
2441-
char = List.to_string([char])
2442-
String.replace(string, char, "\\#{char}")
2441+
String.replace(string, <<char>>, <<?\\, char>>)
24432442
end
24442443

24452444
## Algebra helpers

0 commit comments

Comments
 (0)