liquid icon indicating copy to clipboard operation
liquid copied to clipboard

ParseAndRenderString() panics for certain arguments

Open magiusdarrigo opened this issue 1 year ago • 1 comments

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 IsTemplateError returns 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

PR

magiusdarrigo avatar Aug 06 '24 12:08 magiusdarrigo

Pull request with patch made - https://github.com/osteele/liquid/pull/91

cc: @danog

magiusdarrigo avatar Aug 06 '24 12:08 magiusdarrigo