jinja : fix lexing of float literals with sign (#18901)

* fix lexing of float literals with sign

* add test

* consume_numeric
This commit is contained in:
Sigbjørn Skjæret 2026-01-18 00:57:51 +01:00 committed by GitHub
parent f55b033ae6
commit 420960ab92
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 7 deletions

View file

@ -247,6 +247,12 @@ static void test_expressions(testing & t) {
"Bob"
);
test_template(t, "negative float (not dot notation)",
"{{ -1.0 }}",
json::object(),
"-1.0"
);
test_template(t, "bracket notation",
"{{ user['name'] }}",
{{"user", {{"name", "Bob"}}}},