Closed kohlschuetter closed 1 year ago
FYI @bkiers
@bkiers @msangel Any objections against this change? Thanks in advance for reviewing!
As for me: just add more test cases where the reserved/extended ids used. For example like this: "{% for raw in (1..3) %}{{ raw }}{% endfor %}"
I can do that, but would we be actually hitting different codepaths with them (versus just spending more time testing the same change)?
My concern is that some reserved words will be no longer reserved. The behavior must be like in ruby’s version, including reproduction their errors.
Which reserved words are you thinking of? Aren't non-reserved words already covered by other tests? (This PR fixes one of the few remaining bugs blocking rendering my blog's Jekyll theme, with Java code powered by Liqp)
Had to say that this implementation goes in line with ruby behavior
@kohlschuetter thank you!
Currently we require that the variable names in these blocks/tags are of type "Id", which prevents use to use variable names like "offset". These are commonly used in Jekyll and perfectly fine otherwise.
Change the parser to allow the existing type "id" (lower case) instead of "Id" in these scenarios.