-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Description
It seems that when implementing a multi-line inspect, if you use the line() function the column width counter is not reset for each line. The result being that the second line is broken too early.
Better explained with some code:
defmodule X do
import Inspect.Algebra
def possible_bug do
IO.puts(pretty(line(glue("aaaaa", "bbbbb"), glue("ccccc", "ddddd")), 20))
end
end
iex(114)> X.possible_bug
aaaaa bbbbb
ccccc
ddddd
:ok
I would have expected the output to be broken into two lines in this instance. It seems that the break between ccccc and ddddd occurs as they all won't fit in 20 characters.
Elixir 0.12.2
Metadata
Metadata
Assignees
Labels
No labels