Support for word wrap
TidemannNorli opened this issue · comments
Hi,
It would be super helpful if you would implement word wrap functionality, is that something you will implement?
Thanks
Hello!
Thanks for using receiptline.
The current word wrapping is the same as in the console application, so the words are broken.
Equivalent to CSS word-break: break-all;
The quick br
own fox jump
s over the l
azy dog.
It's superca
lifragilisti
cexpialidoci
ous!
We will consider another word wrapping support.
Equivalent to CSS overflow-wrap: break-word;
The quick
brown fox
jumps over
the lazy
dog.
It's
supercalifra
gilisticexpi
alidocious!
Could not receiptline programmatically add a "\n" when a line has a certain amount of characters before the last word?
This way you can achieve word wrap with break-word
Thank you very much.
When using \n
, write as follows.
(equivalent to <br>
in html)
{width:12}
|The quick\nbrown fox\njumps over\nthe lazy\ndog.\nIt's\nsupercalifragilisticexpialidocious! |
We had a meeting yesterday to discuss the ReceiptLine language specification.
I shared this issue with attendees, and there was a suggestion that we don't need overflow-wrap: break-word;
.
I think this is because the number of characters in a column is often fixed for receipts, so \n
can handle it.