This enables the ability to force whitespace to be stripped following
the end of a block statement by adding a `-` before the closing
tag. This is supported both for stripped the space at the beginning
of a block as well as stripping the space that follows a block.
\r
raw_block_start\r
=\r
- block_open "raw" block_close\r
+ block_open "raw" {SP}* block_close\r
;\r
\r
raw_block_end\r
=\r
- block_open "endraw" block_close\r
+ block_open "endraw" {SP}* block_close\r
;\r
\r
block_expression\r
\r
block_end\r
=\r
- block_open "end" name:IDENTIFIER block_close\r
+ block_open "end" name:IDENTIFIER {SP}* block_close\r
;\r
\r
block_open\r
=\r
@:"{%" {SP}*\r
;\r
+\r
block_close\r
=\r
- {SP}* @:"%}"\r
+ | @:"%}"\r
+ | ( @:"-%}" {SP}* )\r
;\r
\r
line_block_expression\r
The value will increase even more!\r
{% endif %}\r
{% endfor %}\r
-{% macro textarea(name, value='', rows=10, cols=40) %}\r
+{% macro textarea(name, value='', rows=10, cols=40) -%}\r
<textarea name="{{ name }}" rows="{{ rows }}" cols="{{ cols\r
}}">{{ value|e }}</textarea>\r
-{% endmacro %}\r
+{% endmacro -%}\r
{# comment contents\r
across lines #}\r
<ul>\r