From: noah morrison Date: Sat, 1 Nov 2014 19:18:53 +0000 (-0400) Subject: Stopped tokenize from yielding comment tags X-Git-Url: https://git.devinivas.org/?a=commitdiff_plain;h=40644c1b7088aaa6273d1bccc79911c3bb6087d2;p=chevron.git Stopped tokenize from yielding comment tags --- diff --git a/chevron.py b/chevron.py index b6ca106..2b2373f 100755 --- a/chevron.py +++ b/chevron.py @@ -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()