You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have tested my example against Shopify Liquid. (This isn't necessary if the actual behavior is a panic, or an error for which IsTemplateError returns false.)
Expected Behavior
Currently creating an instance of the Liquid Engine registers the various default tags, blocks and filters. I'd like to propose a "basic" variation of the engine which doesn't include these defaults.
Actual Behavior
Detailed Description
My use case is a limited liquid template that users can write some basic markup with access to a selection of variables (bindings) and a few custom filters, but nothing more. I attempted this creating my own instance of liquid.Engine{}, however found that if the template contained say a conditional block, an error would occur because Grammar is nil, and I can't use an instance of liquid.Config in liquid.Engine because cfg is private.
Checklist
IsTemplateError
returns false.)Expected Behavior
Currently creating an instance of the Liquid Engine registers the various default tags, blocks and filters. I'd like to propose a "basic" variation of the engine which doesn't include these defaults.
Actual Behavior
Detailed Description
My use case is a limited liquid template that users can write some basic markup with access to a selection of variables (bindings) and a few custom filters, but nothing more. I attempted this creating my own instance of
liquid.Engine{}
, however found that if the template contained say a conditional block, an error would occur becauseGrammar
isnil
, and I can't use an instance ofliquid.Config
inliquid.Engine
becausecfg
is private.Here's a Go Playground of this in action: https://go.dev/play/p/VK98dDtODp4
Possible Solution
If this is something you are open to, I'd be happy to submit a PR for review. Or perhaps if you have another idea or solution that would be fantastic.
The text was updated successfully, but these errors were encountered: