diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-03-05 01:55:41 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-03-05 01:55:41 +0000 |
commit | 2bc0ea9cebeda00b0b23d633ee87cbc819829fd8 (patch) | |
tree | dc137e7210b619672b3c977ad1d323ccc7776c30 /mako/lexer.py | |
parent | 524bdae950f36d540b18ee5ad7910fadf45e30d1 (diff) | |
download | external_python_mako-2bc0ea9cebeda00b0b23d633ee87cbc819829fd8.tar.gz external_python_mako-2bc0ea9cebeda00b0b23d633ee87cbc819829fd8.tar.bz2 external_python_mako-2bc0ea9cebeda00b0b23d633ee87cbc819829fd8.zip |
- A percent sign can be emitted as the first
non-whitespace character on a line by escaping
it as in "%%". [ticket:112]
Diffstat (limited to 'mako/lexer.py')
-rw-r--r-- | mako/lexer.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mako/lexer.py b/mako/lexer.py index 5e4a3bc..34fe80b 100644 --- a/mako/lexer.py +++ b/mako/lexer.py @@ -371,7 +371,7 @@ class Lexer(object): return False def match_control_line(self): - match = self.match(r"(?<=^)[\t ]*(%|##)[\t ]*((?:(?:\\r?\n)|[^\r\n])*)(?:\r?\n|\Z)", re.M) + match = self.match(r"(?<=^)[\t ]*(%(?!%)|##)[\t ]*((?:(?:\\r?\n)|[^\r\n])*)(?:\r?\n|\Z)", re.M) if match: operator = match.group(1) text = match.group(2) |