]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
Added missing identifiers to the name re
authorArmin Ronacher <armin.ronacher@active-4.com>
Sat, 1 Jul 2017 22:30:25 +0000 (00:30 +0200)
committerArmin Ronacher <armin.ronacher@active-4.com>
Sat, 1 Jul 2017 22:30:25 +0000 (00:30 +0200)
jinja2/lexer.py

index 803a1928acf1f32fefdaaa77a6d9a3a5c0ec12a1..3d48475a50b96528a8288f69ae43f1984edeb8e8 100644 (file)
@@ -42,7 +42,13 @@ except SyntaxError:
     name_re = re.compile(r'\b[a-zA-Z_][a-zA-Z0-9_]*\b')
     check_ident = False
 else:
-    name_re = re.compile(r'\b\w+\b')
+    # for whatever reason these do not exist in 'some' verisons of
+    # python 3 within \w so we just add them.  These are
+    #   0x1885 MONGOLIAN LETTER ALI GALI BALUDA
+    #   0x1886 MONGOLIAN LETTER ALI GALI THREE BALUDA
+    #   0x2118 SCRIPT CAPITAL P
+    #   0x212e ESTIMATED SYMBOL
+    name_re = re.compile(r'\b[\w\u1885\u1886\u2118\u212e]+\b')
     check_ident = True
 
 float_re = re.compile(r'(?<!\.)\d+\.\d+')