Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect "variable was not properly terminated with regexp" error #1502

Closed
andrew-3 opened this issue Dec 28, 2021 · 4 comments
Closed

Incorrect "variable was not properly terminated with regexp" error #1502

andrew-3 opened this issue Dec 28, 2021 · 4 comments

Comments

@andrew-3
Copy link

andrew-3 commented Dec 28, 2021

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 andrew-3 changed the title Incorrect variable was not properly terminated with regexp error Incorrect "variable was not properly terminated with regexp" error Dec 28, 2021
@andershagbard
Copy link
Contributor

Duplicate/Related #1491

@Oscilllator
Copy link

Oscilllator commented Nov 6, 2022

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: /}}/

@dylanahsmith
Copy link
Contributor

Yup, this is a duplicate of #1491

@TidbitSoftware
Copy link

TidbitSoftware commented Sep 7, 2024

I also get an error with the string: f = 1 2 π L C => L = 1 C ( 2 π f ) 2 $$f = \frac{1}{2\pi\sqrt{LC}} => L = \frac{1}{{C(2\pi f)}^2}$$

@Oscilllator I know this is old, but on the off chance you or someone else can benefit from this, I was able to resolve a similar issue (feeding a query to https://latex.codecogs.com/gif.latex) by making sure there's a space between consecutive opening braces,

{{C -> { {C

It likewise resolves,

Liquid Warning: Liquid syntax error (line <LINE_NUM>): Unexpected character \ in "{{[...]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants