From: fabien Date: Mon, 12 Oct 2009 13:18:27 +0000 (+0000) Subject: fixed numbers when one than one decimal X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=b5bf40136c30b256e26d86f5dfcf67020a357ec9;p=konrad%2Ftwig.git fixed numbers when one than one decimal git-svn-id: http://svn.twig-project.org/trunk@33 93ef8e89-cb99-4229-a87c-7fa0fa45744b --- diff --git a/lib/Twig/Lexer.php b/lib/Twig/Lexer.php index 5459736..ed78d78 100644 --- a/lib/Twig/Lexer.php +++ b/lib/Twig/Lexer.php @@ -42,7 +42,7 @@ class Twig_Lexer implements Twig_LexerInterface const POSITION_VAR = 2; const REGEX_NAME = '/[A-Za-z_][A-Za-z0-9_]*/A'; - const REGEX_NUMBER = '/[0-9]+(?:\.[0-9])?/A'; + const REGEX_NUMBER = '/[0-9]+(?:\.[0-9]+)?/A'; const REGEX_STRING = '/(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\')/Asm'; const REGEX_OPERATOR = '/<=? | >=? | [!=]= | [(){}.,%*\/+~|-] | \[ | \] | \? | \:/Ax';