added jinja unicode whitespace handling
authorArmin Ronacher <armin.ronacher@active-4.com>
Sun, 7 Oct 2007 16:53:29 +0000 (18:53 +0200)
committerArmin Ronacher <armin.ronacher@active-4.com>
Sun, 7 Oct 2007 16:53:29 +0000 (18:53 +0200)
--HG--
branch : trunk

jinja/lexer.py

index 18b74849f8a3751868a9c49b5b5158c4de45d72c..3fb3aa043b0221806c4a6f4875d553a55fdbe549 100644 (file)
@@ -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)')