Code

Ticket #4123: firstof_patch.diff

File firstof_patch.diff, 443 bytes (added by Wesley Fok <portland@…>, 7 years ago)

Simple patch for firstof compilation function.

Line 
1Index: defaulttags.py
2===================================================================
3--- defaulttags.py      (revision 4810)
4+++ defaulttags.py      (working copy)
5@@ -491,7 +491,7 @@
6 
7     but obviously much cleaner!
8     """
9-    bits = token.contents.split()[1:]
10+    bits = token.split_contents()[1:]
11     if len(bits) < 1:
12         raise TemplateSyntaxError, "'firstof' statement requires at least one argument"
13     return FirstOfNode(bits)