Mercurial > genshi > mirror
diff genshi/template/text.py @ 1029:7d4414a4a5d0 trunk
Support slash escaped of CRLF newlines (fixes #569; patch from tetsuya.morimoto@gmail.com).
author | hodgestar |
---|---|
date | Wed, 19 Mar 2014 13:40:47 +0000 |
parents | 59463031d904 |
children |
line wrap: on
line diff
--- a/genshi/template/text.py +++ b/genshi/template/text.py @@ -128,7 +128,7 @@ serializer = 'text' _DIRECTIVE_RE = r'((?<!\\)%s\s*(\w+)\s*(.*?)\s*%s|(?<!\\)%s.*?%s)' - _ESCAPE_RE = r'\\\n|\\(\\)|\\(%s)|\\(%s)' + _ESCAPE_RE = r'\\\n|\\\r\n|\\(\\)|\\(%s)|\\(%s)' def __init__(self, source, filepath=None, filename=None, loader=None, encoding=None, lookup='strict', allow_exec=False,