Skip to content
Myr

Merge pull request #203 from aspiers/master

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Prevent line statements eating newlines (fixes #52)

authored by Armin Ronacher · committed by Armin Ronacher · parents c64cc50, 08f38a8 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:jinja2/lexer.py+1 added-1 removed
202 unmodified lines
203 ]204205 if environment.line_statement_prefix is not None:206 rules.append((len(environment.line_statement_prefix), 'linestatement',207 r'^\s*' + e(environment.line_statement_prefix)))207 r'^[ \t\v]*' + e(environment.line_statement_prefix)))208 if environment.line_comment_prefix is not None:209 rules.append((len(environment.line_comment_prefix), 'linecomment',210 r'(?:^|(?<=\S))[^\S\r\n]*' +211 e(environment.line_comment_prefix)))
478 unmodified lines