]> Devi Nivas Git - chevron.git/commitdiff
Removed unneeded if statement
authornoah morrison <noah@morrison.ph>
Wed, 12 Nov 2014 14:30:46 +0000 (09:30 -0500)
committernoah morrison <noah@morrison.ph>
Wed, 12 Nov 2014 14:30:46 +0000 (09:30 -0500)
entei.py

index 6de10d420af4afe935943a9ed5dfcfcd6d77777a..21cf5624a0aa1e8df17fb0a251469d6d841aa726 100755 (executable)
--- a/entei.py
+++ b/entei.py
@@ -76,13 +76,12 @@ def tokenize(template):
     while not template.is_finished:
         literal = grab_literal()
 
-        if literal != '':
-            if literal.find('\n') != -1 or is_standalone:
-                padding = literal.split('\n')[-1]
-                if padding.isspace() or padding == '':
-                    is_standalone = True
-                else:
-                    is_standalone = False
+        if literal.find('\n') != -1 or is_standalone:
+            padding = literal.split('\n')[-1]
+            if padding.isspace() or padding == '':
+                is_standalone = True
+            else:
+                is_standalone = False
 
         if template.is_finished:
             yield ('literal', literal)