From 08f38a872c89dc18036fcee221c6b368a4fe1476 Mon Sep 17 00:00:00 2001 From: Adam Spiers Date: Wed, 1 May 2013 18:42:55 +0100 Subject: [PATCH] Prevent line statements eating newlines (fixes #52) --- jinja2/lexer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jinja2/lexer.py b/jinja2/lexer.py index 69865d08..33867d73 100644 --- a/jinja2/lexer.py +++ b/jinja2/lexer.py @@ -197,7 +197,7 @@ def compile_rules(environment): if environment.line_statement_prefix is not None: rules.append((len(environment.line_statement_prefix), 'linestatement', - r'^\s*' + e(environment.line_statement_prefix))) + r'^[ \t\v]*' + e(environment.line_statement_prefix))) if environment.line_comment_prefix is not None: rules.append((len(environment.line_comment_prefix), 'linecomment', r'(?:^|(?<=\S))[^\S\r\n]*' + -- 2.47.2