Fix truncate issue with preserve at true on last word

Currently, using `truncate` filter allows to not cut a word in the middle, thanks to the `preserve` argument. However, the word is cut if it is the last word of the text. For instance, `My long sentence"|truncate(10, true)` would return `My long se...`.

This PR aims to fix this behavior, adding some unit tests to prove the bug resolution.