From 40644c1b7088aaa6273d1bccc79911c3bb6087d2 Mon Sep 17 00:00:00 2001 From: noah morrison Date: Sat, 1 Nov 2014 15:18:53 -0400 Subject: [PATCH] Stopped tokenize from yielding comment tags --- chevron.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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() -- 2.47.3