-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Description
Environment
Erlang/OTP 19
Elixir 1.4.5
Current behaviour
I've been working a bunch with sigil escaping and I discovered that the Inspect protocol incorrectly prints some sigils with tricky escaping in them.
iex(1)> ~r" \\/ "
~r/ \\/ /
iex(2)> ~r/ \\/ /
...(2)> # Sigil isn't complete!
Expected behaviour
I expected this: ~r/ \\\/ /
However when testing this happened, so I'm unsure:
iex(1)> ~r/ \\\/ / == ~r" \\/ "
false
iex(1)> quote do: ~r/ \\\/ /
{:sigil_r, [context: Elixir, import: Kernel], [{:<<>>, [], [" \\\\/ "]}, []]}
iex(2)> quote do: ~r" \/ "
{:sigil_r, [context: Elixir, import: Kernel], [{:<<>>, [], [" \\/ "]}, []]}
Is this parsing correctly?
Metadata
Metadata
Assignees
Labels
No labels