_is_jinja_tag and _is_block_tag were returning the result of RE.findall instead of a boolean.
This commit is contained in:
parent
4a3ecebeb8
commit
83561e94d5
1 changed files with 2 additions and 2 deletions
|
|
@ -253,14 +253,14 @@ class Renderer(object):
|
||||||
Returns True is tag (str) is a valid jinja instruction tag.
|
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):
|
def _is_block_tag(self, tag):
|
||||||
"""
|
"""
|
||||||
Returns True is tag (str) is a jinja flow control 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):
|
def _tags_in_document(self, document):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue