From 83561e94d50458ea4a8675f0fd67b64a3f846ff4 Mon Sep 17 00:00:00 2001 From: Christopher Date: Sun, 27 Dec 2015 08:59:47 -0600 Subject: [PATCH] _is_jinja_tag and _is_block_tag were returning the result of RE.findall instead of a boolean. --- secretary.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/secretary.py b/secretary.py index 8e7ecb7..7e35ab2 100644 --- a/secretary.py +++ b/secretary.py @@ -253,14 +253,14 @@ class Renderer(object): Returns True is tag (str) is a valid jinja instruction tag. """ - return self.tag_pattern.findall(tag) + return len(self.tag_pattern.findall(tag)) > 0 def _is_block_tag(self, tag): """ Returns True is tag (str) is a jinja flow control tag. """ - return self.block_pattern.findall(tag) + return len(self.block_pattern.findall(tag)) > 0 def _tags_in_document(self, document):