diff options
Diffstat (limited to 'askama_parser/src')
-rw-r--r-- | askama_parser/src/lib.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/askama_parser/src/lib.rs b/askama_parser/src/lib.rs index 65d2eff..67f516c 100644 --- a/askama_parser/src/lib.rs +++ b/askama_parser/src/lib.rs @@ -191,7 +191,11 @@ fn bool_lit(i: &str) -> IResult<&str, &str> { } fn num_lit(i: &str) -> IResult<&str, &str> { - recognize(pair(digit1, opt(pair(char('.'), digit1))))(i) + recognize(tuple(( + opt(char('-')), + digit1, + opt(pair(char('.'), digit1)), + )))(i) } fn str_lit(i: &str) -> IResult<&str, &str> { |