Skip to content
Myr

Fix incorrect truncate filter docs

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

Examples contrary to behavior and description of killwords argument.

authored by Oleg Pesok · committed by Oleg Pesok · parent 85820fc · 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