Add line block pair checking

Similar to how it is done in regular Jinja blocks, line blocks will
now check to make sure that start and end blocks are properly paired
together. When they are not paired together, it will fall back to
parsing them separately like one would expect.
This commit is contained in:
Kevin Brown 2020-05-15 22:17:46 -04:00
parent 32a5f9312a
commit d760329966

View File

@ -14,6 +14,9 @@ class JinjaSemantics(object):
return ast
def line_block_expression_pair(self, ast):
return self.block_expression_pair(ast)
def lineno_from_parseinfo(parseinfo):
return parseinfo.line + 1