Eiyeron / Textbox

A Haxeflixel character-by-character textbox with per-character effects.
MIT License
35 stars 6 forks source link

fixed bug where newlines do not work correctly. #3

Closed marty1912 closed 3 years ago

marty1912 commented 3 years ago

Thank you for your nice work on this textbox! I am using it for a project an came across a problem with displaying newlines. The newlines are ignored and the characters end up on top of each other... I fixed the problem in my fork by switching the order of an "if else" statement.

Cheers, Martin

Eiyeron commented 3 years ago

Hello and thank you for the PR. Nice catch, the documentation explicitly indicates that \n (and \r) are marked as spaces by StringTools.isSpace. Looks good to me, I'll be merging that, thanks!