commit | 284f200ab1803ff10757131ba63f06dd9bbe161d | [log] [tgz] |
---|---|---|
author | Priit Laes <plaes@plaes.org> | Thu Apr 17 21:22:00 2008 +0200 |
committer | Priit Laes <plaes@plaes.org> | Thu Apr 17 21:22:00 2008 +0200 |
tree | b521a48847634fac9cf425498913cb4563d5fbd2 | |
parent | 8464ab1f6c619a66a7421bce0ea808023c45af7b [diff] [blame] |
improved wordcount by removing pointless test --HG-- branch : trunk
diff --git a/jinja2/filters.py b/jinja2/filters.py index fd3d66f..633dbdf 100644 --- a/jinja2/filters.py +++ b/jinja2/filters.py
@@ -374,11 +374,9 @@ len(word.split('\n', 1)[0]) >= pos)], word), s.split(' ')) - def do_wordcount(s): """Count the words in that string.""" - return len(x for x in s.split() if x) - + return len(s.split()) def do_int(value, default=0): """Convert the value into an integer. If the