owl
owl copied to clipboard
Proposal: add word wrapping
If I try to use a string that is too long, I see naive wrapping.
"Very Long Line" |> Owl.Box.new(max_width: 4, border_style: :none)
Very
Lon
g Li
ne
It would be nice if this wrapped to
Very
Long
Line
Any pointers on where to start adding this, and how feasible it might be?
Hi @alexslade
Yes, this is a nice feature.
Any pointers on where to start adding this, and how feasible it might be?
I think a combination of Owl.Data.split/2 and Owl.Data.length/1 can help with this.
I'd like to pick this up. :) Is there a document about contribution? I can't seem to get the tests to run (cannot compile :ssl_verify_fun).
And would simply not considering the first space while chunking be a sufficient implementation or is the idea to have nice wordwraps where we push a whole word to the newline if it fits?
Is there a document about contribution?
Just send a PR :slightly_smiling_face:
I can't seem to get the tests to run (cannot compile :ssl_verify_fun).
What is the error? What version of Elixir and Erlang do you use? Try https://github.com/fuelen/owl/blob/7e94c68fff3e560f3db3b51b016e77c47e9b79be/.github/workflows/ci.yml#L12-L13
I think it is better to start with a simpler implementation
Running 25/1.14 on Debian on WSL
Erlang/OTP 25 [erts-13.1.5] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit:ns] Elixir 1.14.0 (compiled with Erlang/OTP 24)
Doing a mix deps.update --all
seemed to have resolved the issue. App compiles and tests run successfully locally now. :)
I think it is better to start with a simpler implementation
I'll get started with chunking by leading-trimmed lines then!
Hey guys, I added word wrapping, and it is available in v0.10.0 :tada: