liquid icon indicating copy to clipboard operation
liquid copied to clipboard

Variable was not properly terminated with regexp: /\}\}/

Open andershagbard opened this issue 3 years ago • 2 comments

Not sure if this is Liquid or Shopify throwing this error.

This code:

{{ image | image_url: width: '{width}' }}

Sends this error:

Variable '{{ image | image_url: width: '{width}' was not properly terminated with regexp: /\}\}/

andershagbard avatar Nov 22 '21 12:11 andershagbard

Getting this problem as well when trying to implement a regex matcher.

Trying to replace a part of a string with another string using this template:

Liquid::Template.parse("{{ str | replace: '{}', '[]'")

Getting the same error

Liquid syntax error: Variable '{{ str | replace: '{}' was not properly terminated with regexp: /\}\}/ (Liquid::SyntaxError)

alex-ross avatar Nov 19 '23 20:11 alex-ross