diff options
author | Chris Jerdonek <chris.jerdonek@gmail.com> | 2011-12-22 00:24:20 -0800 |
---|---|---|
committer | Chris Jerdonek <chris.jerdonek@gmail.com> | 2011-12-22 00:24:20 -0800 |
commit | 9eab209c6f9c4197a79c70ff8c1dcf1f7785e45a (patch) | |
tree | f7c40638c26bddf0dc3d4ddac027f94f0456e170 /pystache/renderengine.py | |
parent | f6f24cbf06ec323566153f2ce57e416c794e40cd (diff) | |
download | pystache-9eab209c6f9c4197a79c70ff8c1dcf1f7785e45a.tar.gz |
Fixed issue #33 (via fczuardi): "multiline comments not working"
See https://github.com/defunkt/pystache/issues/33
Diffstat (limited to 'pystache/renderengine.py')
-rw-r--r-- | pystache/renderengine.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pystache/renderengine.py b/pystache/renderengine.py index b0b797c..c08dad1 100644 --- a/pystache/renderengine.py +++ b/pystache/renderengine.py @@ -106,7 +106,8 @@ class RenderEngine(object): self.section_re = re.compile(section, re.M|re.S) tag = r"%(otag)s(#|=|&|!|>|\{)?(.+?)\1?%(ctag)s+" % tags - self.tag_re = re.compile(tag) + # We use re.DOTALL to permit multiline comments, in accordance with the spec. + self.tag_re = re.compile(tag, re.DOTALL) def _render_tags(self, template): output = [] |