Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Truncate filter #121

petermanser opened this Issue May 3, 2012 · 1 comment


None yet
2 participants

Wouldn't it make sense to change

if len(s) <= length:


if len(s) <= length + len(end):

Source: https://github.com/mitsuhiko/jinja2/blob/master/jinja2/filters.py#L457

Not sure if it makes sense to shorten a word, even if the shortened version is equal or longer than the source (like twitter shortening links).


mitsuhiko commented Dec 13, 2013

This is done now.

@mitsuhiko mitsuhiko closed this Dec 13, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment