liquid icon indicating copy to clipboard operation
liquid copied to clipboard

Warning when variable starts with a number

Open emm26 opened this issue 3 years ago • 1 comments

Hello, I think you might be able to help me with this issue.

when parsing a template that contains a variable that begins with a number I get this warning here:

script = '{% if variable==true or 2variable==false%}{% remove %}{% endif %}'
Liquid::Template.parse(script, error_mode: :warn).warnings
Liquid::SyntaxError: Liquid syntax error: Expected end_of_string but found id in "variable==true or 2variable==false"

If I change the variable name to not begin with a number I don't get any warnings.

I don't understand why this scenario translates into a warning

emm26 avatar May 13 '22 17:05 emm26

I have the same problem :C, I don't see it being resolved.

fernandonavajas avatar Mar 11 '24 20:03 fernandonavajas