]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
Fix incorrect truncate filter docs 388/head
authorOleg Pesok <olegpesok@gmail.com>
Thu, 11 Dec 2014 01:15:40 +0000 (17:15 -0800)
committerOleg Pesok <olegpesok@gmail.com>
Thu, 11 Dec 2014 01:16:25 +0000 (17:16 -0800)
Examples contrary to behavior and description of killwords argument.

jinja2/filters.py

index 4ea5b0ac1cae143513ff486f44380ab263f2ccac..bb14f39522eb8ab40450c8f06f09ac0d41fa5330 100644 (file)
@@ -467,9 +467,9 @@ def do_truncate(s, length=255, killwords=False, end='...'):
     .. sourcecode:: jinja
 
         {{ "foo bar baz"|truncate(9) }}
-            -> "foo ba..."
-        {{ "foo bar baz"|truncate(9, True) }}
             -> "foo ..."
+        {{ "foo bar baz"|truncate(9, True) }}
+            -> "foo ba..."
 
     """
     if len(s) <= length: