]> Devi Nivas Git - chevron.git/commitdiff
Special handling for 'set delimiter?'
authorDaniel Morrison <dan@morrison.ph>
Sun, 16 Nov 2014 05:19:15 +0000 (00:19 -0500)
committerDaniel Morrison <dan@morrison.ph>
Sun, 16 Nov 2014 05:36:19 +0000 (00:36 -0500)
I don’t understand why, but this helps unit tests pass.

entei.py

index 6f01976593d1e106aa245e5c7ed4038f632cc6b1..1c7984e2c7e1be9a733bbe95d287c33c100616c9 100755 (executable)
--- a/entei.py
+++ b/entei.py
@@ -140,7 +140,11 @@ def tokenize(template):
                     literal = literal.rstrip(' ')
 
             else:
-                template = until + '\n' + template
+                # TODO: Understand this code.
+                if tag_type == 'set delimiter?':
+                    template = until
+                else:
+                    template = until + '\n' + template
 
         # If we're a tag can't be a standalone
         elif tag_type in ['variable', 'no escape']: