-
Notifications
You must be signed in to change notification settings - Fork 356
Closed
elixir-makeup/makeup_elixir
#39Description
With a function doc like:
@doc """
Example
iex> existing_zipper = (\"\"\"
...> IO.inspect("Hello, world!")
...> IO.puts("abc")
...> \"\"\"
...> |> Sourceror.parse_string!()
...> |> Sourceror.Zipper.zip())
"""
def abc do
end
The generated ex_doc docs look correct:
However, when those docs are copy and pasted, the newlines within the heredoc are stripped, resulting in the string:
existing_zipper = ("""IO.inspect("Hello, world!")IO.puts("abc")"""
|> Sourceror.parse_string!()
|> Sourceror.Zipper.zip())
When that is run in IEx the user gets an error like:
iex(17)> existing_zipper = ("""IO.inspect("Hello, world!")IO.puts("abc")"""
** (SyntaxError) invalid syntax found on iex:17:23:
error: heredoc allows only whitespace characters followed by a new line after opening """
│
17 │ existing_zipper = ("""IO.inspect("Hello, world!")IO.puts("abc")"""
│ ^
│
└─ iex:17:23
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
