Fix truncate issue with preserve at true on last word
bug #104 Fix truncate issue with preserve at true on last word (jpetitcolas)

This PR was squashed before being merged into the 1.0.x-dev branch (closes #104).

Discussion
----------

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.

Commits
-------

1ec30de Fix truncate issue with preserve at true on last word