Skip to content
Myr

Merge pull request #388 from olegpesok/truncateDocFix

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Fix incorrect truncate filter docs

authored by Markus Unterwaditzer · committed by Markus Unterwaditzer · parents 242cd2c, 4e7f44a · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:jinja2/filters.py+2 added-2 removed
465 unmodified lines
466467 .. sourcecode:: jinja468469 {{ "foo bar baz"|truncate(9) }}470 -> "foo ba..."471 {{ "foo bar baz"|truncate(9, True) }}470 -> "foo ..."471 {{ "foo bar baz"|truncate(9, True) }}472 -> "foo ba..."473474 """475 if len(s) <= length:476 return s
518 unmodified lines