From cb1b97f088f93967b912e6bfb968cb9cfd88f538 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Wed, 10 Sep 2008 14:03:53 +0200 Subject: [PATCH] It's now possible to use ``{{ foo.0.0 }}`` --HG-- branch : trunk --- CHANGES | 2 ++ jinja2/lexer.py | 2 +- tests/test_syntax.py | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 23ad978..c1eb733 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 9702205..14b7110 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'(?