liquid
liquid copied to clipboard
ParseAndRenderString() panics for certain arguments
Checklist
- [x] I have searched the issue list
- [x] I have tested my example against Shopify Liquid. (This isn't necessary if the actual behavior is a panic, or an error for which
IsTemplateErrorreturns false.)
Expected Behavior
Gracefully returns an error
Actual Behavior
Panics
Detailed Description
I have the line of code:
result, err := lqEngine.ParseAndRenderString(template, bindings)
if template equals the string: {% if %} the line panics.
Possible Solution
Pull request with patch made - https://github.com/osteele/liquid/pull/91
cc: @danog