Closed rap2hpoutre closed 4 years ago
If you try to indent a multi-line text spinner everything breaks.
Try using the indent
option on the spinner that would love to make some friends and see for yourself.
The problem is getLinesLength
and breakText
don't take the indent
option into consideration.
Edit: getLinesLength
does take indent into consideration the problem is with breakText
.
breakText
is not aware of the extra spaces which will result in the text breaking at the wrong spot.
Also multi-line strings should have all lines indented.
Hello, @rap2hpoutre! Sorry for the super late response! I just came back from vacations! I'll review this PR by the end of the weekend :slightly_smiling_face:.
I fixed the multiline problem thanks to @SweetMNM comment (in ac1a4b0)
@jcarpanelli You could now retry, it works for me (even with multi-line).
@jcarpanelli I added some tests in this commit: d515657. Let me know if it' OK for you
@jcarpanelli 👍 Thank you! When do you plan to release it?
Hey @rap2hpoutre! I've just published v0.5.0
:slightly_smiling_face:
Thank you!!
Added indent option. Fixes https://github.com/jcarpanelli/spinnies/issues/14