liquid icon indicating copy to clipboard operation
liquid copied to clipboard

Incorrect "variable was not properly terminated with regexp" error

Open andrew-3 opened this issue 3 years ago • 1 comments

If I do:

Liquid::Template.parse("{{ '{}' }}")

I get Liquid::SyntaxError: Liquid syntax error: Variable '{{ '{}' was not properly terminated with regexp: /\}\}/ which is not correct.

Tested on version 5.1.0.

andrew-3 avatar Dec 28 '21 15:12 andrew-3

Duplicate/Related https://github.com/Shopify/liquid/issues/1491

andershagbard avatar Jan 06 '22 09:01 andershagbard

I also get an error with the string: $$f = \frac{1}{2\pi\sqrt{LC}} => L = \frac{1}{{C(2\pi f)}^2}$$ $$f = \frac{1}{2\pi\sqrt{LC}} => L = \frac{1}{{C(2\pi f)}^2}$$ Error: github-pages 227 | Error: Liquid syntax error (line 55): Variable '{{C(2\pi f)}' was not properly terminated with regexp: /}}/

Oscilllator avatar Nov 06 '22 20:11 Oscilllator

Yup, this is a duplicate of https://github.com/Shopify/liquid/issues/1491

dylanahsmith avatar Nov 07 '22 16:11 dylanahsmith