From: Kevin Brown Date: Fri, 15 May 2020 03:34:06 +0000 (-0400) Subject: Fix call argument parsing X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4d39c1693ff860f1298c8e0107e5ec5041594856;p=thirdparty%2Fjinja.git Fix call argument parsing This temporarily break how `{% call %}` blocks work when arguments are passed into them because it did not work consistently before. It only worked for a single argument being passed in because of how conditional expressions stripped out the parentheses if they were present. Now they are properly captured but the parser does not yet put them into the correct location within the Jinja AST. --- diff --git a/grammar.ebnf b/grammar.ebnf index 949c1aae..8a988c9d 100644 --- a/grammar.ebnf +++ b/grammar.ebnf @@ -55,7 +55,9 @@ block_expression_single block_start = - block_open !("end") name:IDENTIFIER {SP}* parameters:[ block_parameters ] {SP}* block_close + block_open !("end") name:IDENTIFIER [ "(" name_call_parameters:variable_accessor_call_parameters ")" ] + [ {SP}+ parameters:block_parameters ] + {SP}* block_close ; block_end