From 51b3b3ab38760858aad885f42b0806f9b2f76937 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Sun, 4 Mar 2007 20:51:39 +0100 Subject: [PATCH] [svn] fixed name / operator priority --HG-- branch : trunk --- jinja/lexer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jinja/lexer.py b/jinja/lexer.py index bb7dc95..970a1c6 100644 --- a/jinja/lexer.py +++ b/jinja/lexer.py @@ -13,7 +13,7 @@ from jinja.exceptions import TemplateSyntaxError # static regular expressions whitespace_re = re.compile(r'\s+(?m)') -name_re = re.compile(r'[a-zA-Z_][a-zA-Z0-9_]*[!?]?') +name_re = re.compile(r'[a-zA-Z_][a-zA-Z0-9_]*') string_re = re.compile(r"('([^'\\]*(?:\\.[^'\\]*)*)'" r'|"([^"\\]*(?:\\.[^"\\]*)*)")(?ms)') number_re = re.compile(r'\d+(\.\d+)*') @@ -59,8 +59,8 @@ class Lexer(object): tag_rules = [ (whitespace_re, None, None), (number_re, 'number', None), - (operator_re, 'operator', None), (name_re, 'name', None), + (operator_re, 'operator', None), (string_re, 'string', None) ] -- 2.26.2