]> Devi Nivas Git - chevron.git/commitdiff
More is finished stuff.
authorDaniel Morrison <dan@morrison.ph>
Sun, 16 Nov 2014 04:08:39 +0000 (23:08 -0500)
committerDaniel Morrison <dan@morrison.ph>
Sun, 16 Nov 2014 04:08:39 +0000 (23:08 -0500)
entei.py

index 67b471f4937150d1caf0ea9ef18027fd27bc4056..72a402f841c41852cc13c2b09c9d71a2021c9cc5 100755 (executable)
--- a/entei.py
+++ b/entei.py
@@ -138,20 +138,7 @@ def tokenize(template):
                     literal = literal.rstrip(' ')
 
             else:
-                # TODO: this is messy
-
-                # Otherwise we aren't a standalone
-                is_standalone = False
-
-                # If we're a set delimiter tag
-                if tag_type == 'set delimiter?':
-                    # Then step back the length of the stuff we grabbed
-                    template.seek(template.tell() - len(until))
-                else:
-                    # Otherwise step back the length plus one
-                    template.seek(template.tell() - (len(until) + 1))
-
-                # I don't know why there's a difference...
+                template = until + '\n' + template
 
         # If we're a tag can't be a standalone
         elif tag_type in ['variable', 'no escape']: