harttle / liquidjs

A simple, expressive, safe and Shopify compatible template engine in pure JavaScript.
https://liquidjs.com
MIT License
1.5k stars 237 forks source link

Option to allow Commas in Parse Parameters Tokenizer #722

Closed zachleat closed 1 month ago

zachleat commented 1 month ago

While upgrading to use Liquid’s parameter parser in Eleventy (and away from our home-grown one that is old): https://github.com/11ty/eleventy/issues/2679 one of the biggest backwards compatibility issues that I think we’ll have is that our custom parser allowed the use of commas to separate parameters and the Liquid one does not (nor does it fail with an error—looks like it hangs).

https://liquidjs.com/tutorials/parse-parameters.html#Parse-Parameters-as-Values

I’m curious if this can be improved—and best case scenario would be to add support for optional commas! Or maybe an opt-in option? Thanks!