Open deanebarker opened 2 years ago
This is not technically a "Liquid" syntax thing
If it's not, so this may introduce extra overhead in parser
This could be cool if the editor or IDE support auto completion, otherwise you will see that you write everything yourself ;)
Dots are not supported in filter names, in Liquid. -
and _
are however.
I am not opposed to having this being a flag, like other extensions to the language. The implementation would be to accept dots in the parser that is used for identifiers (in filters only) here https://github.com/sebastienros/fluid/blob/91aa570a5f0ad0f145ec03cec9d6d75b8ce980c1/Fluid/FluidParser.cs#L170
Should we be able to refer to "namepsaced" filters that include dots?
We can register them. This works fine:
However, you get a
ParseException
if you try to use it:This is not technically a "Liquid" syntax thing, since this sits in the intersection between the language and the underlying implementation. I didn't find any "namespaced" filters in Liquid proper, but I also didn't see anything that prohibited them.
Scriban uses namespaces in all cases. Ex:
string.append
I don't want to go that far -- I think "simple" filter names should be the default. But in the case of a set of closely related filters, it might be helpful.