diff options
-rw-r--r-- | CHANGES | 3 | ||||
-rw-r--r-- | mako/lexer.py | 2 | ||||
-rw-r--r-- | test/test_lexer.py | 6 |
3 files changed, 9 insertions, 2 deletions
@@ -7,6 +7,9 @@ instead of ``# -*- encoding:%s -*-``; the former is more common and compatible with emacs. Courtesy Martin Geisler. +- [bug] Fixed issue where an old lexer rule prevented a template line + which looked like "#*" from being correctly parsed. [ticket:224] + 0.9.0 - [bug] The Context.locals_() method becomes a private underscored method, as this method has a specific internal use. The purpose diff --git a/mako/lexer.py b/mako/lexer.py index 034caf7..42b9ecd 100644 --- a/mako/lexer.py +++ b/mako/lexer.py @@ -345,8 +345,6 @@ class Lexer(object): | (?=\${) # an expression | - (?=\#\*) # multiline comment - | (?=</?[%&]) # a substitution or block or call start or end # - don't consume | diff --git a/test/test_lexer.py b/test/test_lexer.py index 3076de4..3e97bef 100644 --- a/test/test_lexer.py +++ b/test/test_lexer.py @@ -155,6 +155,12 @@ class LexerTest(TemplateTest): ControlLine('if', 'endif', True, (7, 1)), Text(' ', (8, 1))])) + def test_old_multiline_comment(self): + template = """#*""" + node = Lexer(template).parse() + self._compare(node, TemplateNode({}, [Text('''#*''', (1, 1))])) + + def test_text_tag(self): template = \ """ |