From: Armin Ronacher Date: Wed, 10 Sep 2008 12:03:53 +0000 (+0200) Subject: It's now possible to use ``{{ foo.0.0 }}`` X-Git-Tag: 2.1~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb1b97f088f93967b912e6bfb968cb9cfd88f538;p=thirdparty%2Fjinja.git It's now possible to use ``{{ foo.0.0 }}`` --HG-- branch : trunk --- diff --git a/CHANGES b/CHANGES index 23ad978c..c1eb7334 100644 --- a/CHANGES +++ b/CHANGES @@ -12,6 +12,8 @@ Version 2.1 - fixed a bug with the i18n extension that caused the explicit pluralization block to look up the wrong variable. +- fixed a limitation in the lexer that made ``{{ foo.0.0 }}`` impossible. + Version 2.0 ----------- (codename jinjavitus, released on July 17th 2008) diff --git a/jinja2/lexer.py b/jinja2/lexer.py index 9702205d..14b7110e 100644 --- a/jinja2/lexer.py +++ b/jinja2/lexer.py @@ -31,7 +31,7 @@ string_re = re.compile(r"('([^'\\]*(?:\\.[^'\\]*)*)'" r'|"([^"\\]*(?:\\.[^"\\]*)*)")', re.S) integer_re = re.compile(r'\d+') name_re = re.compile(r'\b[a-zA-Z_][a-zA-Z0-9_]*\b') -float_re = re.compile(r'\d+\.\d+') +float_re = re.compile(r'(?