From: Armin Ronacher Date: Fri, 23 Mar 2007 15:58:36 +0000 (+0100) Subject: [svn] and delete jinja 1.0 again. python2.3 bug X-Git-Tag: 2.0rc1~394 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6d84be35ec6c17309a7c43f2dca20dd1bcc7d311;p=jinja2.git [svn] and delete jinja 1.0 again. python2.3 bug --HG-- branch : trunk --- diff --git a/jinja/lexer.py b/jinja/lexer.py index d419c03..9b73e18 100644 --- a/jinja/lexer.py +++ b/jinja/lexer.py @@ -23,7 +23,7 @@ string_re = re.compile(r"('([^'\\]*(?:\\.[^'\\]*)*)'" r'|"([^"\\]*(?:\\.[^"\\]*)*)")(?ms)') number_re = re.compile(r'\d+(\.\d+)*') -operator_re = re.compile('(%s)' % '|'.join( +operator_re = re.compile('(%s)' % '|'.join([ isinstance(x, unicode) and str(x) or re.escape(x) for x in [ # math operators '+', '-', '*', '/', '%', @@ -32,7 +32,7 @@ operator_re = re.compile('(%s)' % '|'.join( # attribute access and comparison / logical operators '.', ':', ',', '|', '==', '<', '>', '<=', '>=', '!=', '=', ur'or\b', ur'and\b', ur'not\b', ur'in\b', ur'is' -])) +]])) # set of used keywords keywords = set(['and', 'block', 'cycle', 'elif', 'else', 'endblock',