]> Devi Nivas Git - chevron.git/commitdiff
Stopped tokenize from yielding comment tags
authornoah morrison <noah@morrison.ph>
Sat, 1 Nov 2014 19:18:53 +0000 (15:18 -0400)
committernoah morrison <noah@morrison.ph>
Sat, 1 Nov 2014 19:18:53 +0000 (15:18 -0400)
chevron.py

index b6ca106aeebe3105ad1ae350d80149beea9813ee..2b2373f4a00a1161b542ddb39f76661e3c0cf9bc 100755 (executable)
@@ -20,7 +20,6 @@ def tokenize(template):
 
     Where tag_type is one of:
      * literal
-     * comment
      * section
      * inverted section
      * end
@@ -108,7 +107,8 @@ def tokenize(template):
             if tag_key != last_section:
                 raise UnclosedSection()
 
-        yield (tag_type, tag_key)
+        if tag_type != 'comment':
+            yield (tag_type, tag_key)
 
     if open_sections:
         raise UnclosedSection()