Ian Ker-Seymer
1b2b62964e
Allow for binary comparison of incompatible strings
2024-01-30 19:03:05 -05:00
Marco Rudilosso
21d6197533
Call to_liquid_value when short circuiting conditions
2023-07-19 15:22:12 +00:00
Guilherme Carreiro and GitHub
9ab688eada
Update rubocop-shopify (2.7.0 -> 2.12.0) ( #1687 )
2023-02-15 08:40:59 +01:00
Thierry Joyal
1d2bee1f60
Condition#evaluate to receive mandatory context argument
2022-03-02 14:35:31 -05:00
Charles-P. Clermont
e86fe27259
Fix lint
2021-09-09 11:22:39 -04:00
Michael Go
f686c5dec7
use Utils.to_liquid_value on conditionals
2021-06-14 18:19:37 -03:00
Dylan Thacker-Smith and GitHub
10ea6144e0
Add Liquid::ParseContext#parse_expression for liquid-c node disabling ( #1333 )
...
We would like to be able to disable liquid-c VM rendering at runtime,
but right now expression parsing is done using Expression.parse, which
isn't aware of the parse context. That prevents us from conditionally
compiling to VM code based on a parse option.
2020-10-27 11:00:04 -04:00
Dylan Thacker-Smith and GitHub
a03f02789b
Only use MethodLiteral in condition expressions ( #1300 )
2020-09-25 11:10:33 -04:00
Alessandro Diogo Brückheimer and Mike Angell
e83b1e4159
Add ForceEqualSignAlignment to .rubocop.yml ( #1190 )
...
* Add ForceEqualSignAlignment to .rubocop.yml
* Revert ForceEqualSignAlignment cop
* Update method alignment
* Undo addition of whitespace to improve readability
* Fix missing alignment
2019-10-21 21:18:48 +10:00
0d26f05bb8
Enabled frozen string literals ( #1154 )
...
* Enabled frozen string literals
* Update rubocop config
* Prefer string interpolation in simple cases
Co-Authored-By: Dylan Thacker-Smith <[email protected] >
2019-09-18 13:19:45 +10:00
Mike Angell
799da202df
Apply simple rubocop fixes
2019-08-31 21:58:33 +10:00
Stephen Paul Weber
7d13d88258
s/Traversal/ParseTreeVisitor
2018-10-18 09:38:33 -04:00
Stephen Paul Weber
c11fc656cf
Colocate Traversal classes with classes they traverse
...
This puts all knowledge of the traversal in the same file, and removes
the need for a CASES registry.
2018-10-18 09:37:48 -04:00
Stephen Paul Weber
d789ec4175
Liquid::Traversal
...
This enables traversal over whole document tree.
2018-10-15 10:11:58 -04:00
Dylan Thacker-Smith and GitHub
8928454e29
Use a loop to evaluate binary comparisions to avoid recursion ( #891 )
...
Using recursion allows a malicious template to cause a SystemStackError
2017-05-10 10:41:24 -04:00
Dylan Thacker-Smith and GitHub
2bb3552033
Fix internal liquid error when comparing hash with incompatible type ( #849 )
2017-01-16 13:13:17 -05:00
Florian Weingarten
4c22cef341
blank and empty as variable names
2015-06-04 12:30:50 -04:00
Dylan Thacker-Smith
8a2947865b
Avoid an exception from checking if a string contains a non-string.
2015-06-03 02:21:51 -04:00
Florian Weingarten
3372ca8136
Rubocop
2015-05-14 14:37:18 +00:00
Dylan Thacker-Smith
a1a128db19
Refactor Condition so that it takes a parsed expression.
2014-10-18 15:03:40 -04:00
Dylan Thacker-Smith
37260f17ff
Use Expression.parse and Context#evaluate in the Condition class.
2014-10-18 14:27:58 -04:00
Florian Weingarten
7196a2d58e
Avoid parallel assignments
2014-10-18 13:58:32 +00:00
Bogdan Gusiev
4e9d414fde
Fixed condition constains operator with wrong data type
...
"contains" operator on wrong data type should not cause NoMethodError.
2014-08-18 17:32:29 +03:00
Bogdan Gusiev
fa14fd02e7
Raise Liquid::ArugmentError when condition has wrong usage
...
Condition now raises ::ArgumentError when built wrongly.
This patch make it raise Liquid::ArgumentError instead
to indicate a liquid markup error instead of ruby error.
2014-04-21 16:42:37 +03:00
Florian Weingarten
0a7de51e2b
Revert some freezes on non-literals
2014-01-27 14:56:07 -05:00
Florian Weingarten
43ac8d560b
Freeze all the things
2014-01-07 12:35:16 -05:00
James MacAulay
11dc18bfdf
A better fix for "and"/"or" in strings
...
(now with less side effects)
2009-09-23 15:44:29 -04:00
James MacAulay
f42ce88456
fixed conditions with strings containing "and"/"or"
2009-09-14 15:01:26 -04:00
James MacAulay
d1d6febfc1
'contains' operator returns false if either operand is nil
2009-08-19 19:38:31 -04:00
Jakub Kuźma and Tobias Lütke
8d27864845
Ruby 1.9.1 bugfixes
...
Signed-off-by: Tobias Lütke <[email protected] >
2009-04-17 06:33:25 +08:00
Tobias Lütke
7f58cbf82d
Merged last set of changes from original SVN location
2008-05-08 11:34:43 -04:00
Tobias Lütke
1d647361e1
Initial github import of liquid
2008-05-08 11:28:13 -04:00