New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect behavior of truncate filter #699
Comments
Check whether this is caused by the https://github.com/pallets/jinja/blob/master/jinja2/filters.py#L467 |
It is. Setting leeway to 0 fixes the issue. I'd say it's POLA violation when using short strings. |
Yeah I agree @AMDmi3 . We just hit this issue as well. The problem is that Jinja has an opinionated implementation which is incompatible with usage as a general purpose templating engine. |
I also found this problem and spend several hours finding the bug. Clearly new options should be backwards compatible and the default should be |
Code:
Expected Behavior
Actual Behavior
Template Code
Your Environment
The text was updated successfully, but these errors were encountered: