malte-wessel / react-textfit

React component to fit headlines and paragraphs into elements
http://malte-wessel.github.io/react-textfit/
MIT License
469 stars 143 forks source link

doesn't work with hyphen (minus) and parentheses #93

Open nkbartc opened 1 year ago

nkbartc commented 1 year ago

Hi team, thanks for this amazing library!

I would like to report there are issues with hyphen (minus) and parentheses. Any input after a hyphen or a number of ( and ) will cause next line unexpectedly. Please see the screen shots. I found these issues in my own project which tries to fit text in a div instead of a textbox. But I also found the same issues exist in your demo. (https://malte-wessel.com/react-textfit/). Any help will be much appreciated!!

image image image