From: Kevin Brown Date: Sat, 16 May 2020 02:20:51 +0000 (-0400) Subject: Properly split up line blocks from line block pairs X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=61060096bdedbecd38a7100d83d05eb7fe1cb7c3;p=thirdparty%2Fjinja.git Properly split up line blocks from line block pairs This is necessary for us to do proper pairing of line blocks since otherwise the rejection would disallow line blocks of any type. --- diff --git a/grammar.ebnf b/grammar.ebnf index 4707c162..95a00351 100644 --- a/grammar.ebnf +++ b/grammar.ebnf @@ -89,8 +89,18 @@ block_close_symbol line_block_expression = - | ( start:line_block_start contents:expressions end:line_block_end ) - | block:line_block_start + | line_block_expression_pair + | line_block_expression_single + ; + +line_block_expression_pair + = + start:line_block_start contents:expressions end:line_block_end + ; + +line_block_expression_single + = + block:line_block_start ; line_block_start