From: Armin Ronacher Date: Sun, 7 Oct 2007 16:53:29 +0000 (+0200) Subject: added jinja unicode whitespace handling X-Git-Tag: 2.0rc1~264 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0949e4dd3ca92975b89b42329c5188a7cde18f78;p=jinja2.git added jinja unicode whitespace handling --HG-- branch : trunk --- diff --git a/jinja/lexer.py b/jinja/lexer.py index 18b7484..3fb3aa0 100644 --- a/jinja/lexer.py +++ b/jinja/lexer.py @@ -39,7 +39,7 @@ _lexer_cache = WeakValueDictionary() # static regular expressions -whitespace_re = re.compile(r'\s+(?m)') +whitespace_re = re.compile(r'\s+(?um)') name_re = re.compile(r'[a-zA-Z_][a-zA-Z0-9_]*') string_re = re.compile(r"('([^'\\]*(?:\\.[^'\\]*)*)'" r'|"([^"\\]*(?:\\.[^"\\]*)*)")(?ms)')