]> Devi Nivas Git - chevron.git/commitdiff
Use endswith instead of splicing
authornoah morrison <noah@morrison.ph>
Sat, 15 Nov 2014 03:38:46 +0000 (22:38 -0500)
committernoah morrison <noah@morrison.ph>
Sat, 15 Nov 2014 03:38:46 +0000 (22:38 -0500)
entei.py

index e68ae4056c802fbd85c4ad04ac7b0061431c108e..b0800a0fda100d90a0422ad621612e9b06304fd0 100755 (executable)
--- a/entei.py
+++ b/entei.py
@@ -102,7 +102,7 @@ def tokenize(template):
                 template.seek(template.tell() - 1)
 
         elif tag_type == 'set delimiter?':
-            if tag_key[-1] == '=':
+            if tag_key.endswith('='):
                 dels = tag_key[:-1].strip().split(' ')
                 l_del, r_del = dels[0], dels[-1]