Skip to content

Commit

Permalink
apply fix from asummers#46
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszsamson committed Sep 27, 2023
1 parent d8b7b80 commit 82db0e8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/erlex.ex
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ defmodule ErlexVendored do
end
end

defp atomize(<<number>>) when is_number(number) do
defp atomize(<<number>>) when is_number(number) and number != 95 do
to_string(number)
end

Expand Down
7 changes: 7 additions & 0 deletions test/pretty_print_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -590,4 +590,11 @@ defmodule ErlexVendored.Test.PretyPrintTest do

assert pretty_printed == "(<<114, 111, 108, 101, 115, 95, 117, 115, 101, 114, 115>>)"
end

test "keep underscore in pattern" do
input = "{'embed', __@3, __@4}"
pretty_printed = ErlexVendored.pretty_print_type(input)

assert pretty_printed == "{:embed, _, _}"
end
end

0 comments on commit 82db0e8

Please sign in to comment.