diff options
author | René Kijewski <rene.kijewski@fu-berlin.de> | 2022-11-09 02:30:03 +0100 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2022-11-09 09:38:25 +0100 |
commit | 58d3938fb7631c3ab74b7bf48a21240face3a265 (patch) | |
tree | e0c740750a5bcdad788958178e6e866a8539bb3a /askama_derive/templates/b.html | |
parent | 6f52d0eef5a3178e1ebf7d4c7e2cf397756f57eb (diff) | |
download | askama-58d3938fb7631c3ab74b7bf48a21240face3a265.tar.gz askama-58d3938fb7631c3ab74b7bf48a21240face3a265.tar.bz2 askama-58d3938fb7631c3ab74b7bf48a21240face3a265.zip |
Fail to parse if keyword is not longest ident
This PR makes e.g. `{% leta = b %}` a parsing error. To the reader it
would appear that `leta` should be a meaningful expression in Askama,
which it is not. Before this PR, `leta` was tokenized as `let` + `a`.
This PR makes the parser try to find the longest identifier at a parsing
positions and only compare the outcome against the expected keyword.
This is potentially a breaking change, because code that should always
have been invalid will now fail to compile, when it was accepted before.
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions