kswedberg / jquery-expander

Expand and Collapse HTML content
https://kswedberg.github.io/jquery-expander/
Other
459 stars 168 forks source link

preserveWord logic is flawed: strings of numbers are not preserved #107

Closed teo1978 closed 9 years ago

teo1978 commented 9 years ago

In a text like "Lorem ipsum ....... bla bla 1234567890 dolor sit amet" with preserveWord=true, the expected behavior is that the number 1234567890 should never be spliced. Instead, if the slice point happens to fall among the digits, the number will be split. That's fundamentally wrong.