Charles-P. Clermont and Guilherme Carreiro
6a9e46dd19
Add rigid_parse method to include
2025-10-27 16:33:31 +01:00
Charles-P. Clermont and Guilherme Carreiro
e58ac0e75b
Add rigid_parse to render
2025-10-27 16:33:31 +01:00
Charles-P. Clermont and Guilherme Carreiro
c78bf20010
Add a rigid_parse method to cycle
2025-10-27 16:33:31 +01:00
Marco Concetto Rudilosso
c34dd812c5
Fully revert calling to_s on filter array
2025-04-14 17:36:45 +02:00
Marco Concetto Rudilosso
f676e699a4
rollback changes to tests
2025-04-14 11:24:01 +02:00
Marco Concetto Rudilosso
b459eb656f
remove test
2025-04-14 11:17:46 +02:00
Marco Concetto Rudilosso
c6dcf3e714
add test
2025-04-14 11:17:46 +02:00
Marco Concetto Rudilosso
4dae678c63
Revert "Stringify properties before filtering ( #1929 )"
...
This reverts commit f5d6a36574 .
2025-04-14 11:17:46 +02:00
Ian Ker-Seymer and GitHub
dbe709c3bf
Use to_liquid_value in uniq filter ( #1948 )
...
* Use to_liquid_value in uniq filter
* Bump version to 5.8.4
2025-04-09 15:00:01 -04:00
2b75bfaff4
Fix regression when using empty/nil properties with array filters ( #1944 )
...
* Make all array filters that use `filter_array` util process empty string and nil correctly
* up version
* fix ordering of checks
* also do it for map
* Do not raise property error
* Gracefully empty property in map filter
---------
Co-authored-by: Marco Concetto Rudilosso <[email protected] >
2025-04-04 11:27:29 -04:00
aa1640035f
Always stringify properties in all array filters ( #1936 )
...
* Always stringify sum property.
* Add test
* always stringify properties in all array filters
* fix syntax error
* up version
---------
Co-authored-by: Dominic Petrick <[email protected] >
2025-03-19 13:50:01 -04:00
Ian Ker-Seymer and GitHub
f5d6a36574
Stringify properties before filtering ( #1929 )
2025-03-17 17:43:57 -04:00
Guilherme Carreiro
f9454d8cf3
Fix array filters to not support nested properties
2025-01-31 13:53:17 +01:00
Guilherme Carreiro and Guilherme Carreiro
bf1419b8ac
Apply the same fix for find_index and has
2025-01-24 08:39:01 +01:00
Guilherme Carreiro and Guilherme Carreiro
5718c4cee2
Fix the find filter to return nil when filtering empty arrays
2025-01-24 08:39:01 +01:00
Ian Ker-Seymer and GitHub
6372289ba3
Ensure we use InputIterator#each when in join filter ( #1898 )
2025-01-16 11:36:36 -05:00
Ian Ker-Seymer and GitHub
0ec52a40b5
Use Liquid::Utils.to_s for join filter ( #1897 )
2025-01-16 11:21:58 -05:00
Ian Ker-Seymer and GitHub
74af735f0e
Allow for custom < Hash classes to override #to_s ( #1896 )
2025-01-16 11:16:13 -05:00
4b65a28722
Implement logic for stringify Hashes to keep compat with 3.4 ( #1892 )
...
* Exploring
* Bump to v5.6.5
---------
Co-authored-by: Dominic Petrick <[email protected] >
2025-01-15 16:36:53 -05:00
6909570f8e
Add find, find_index, has, and reject filters to arrays ( #1869 )
...
* Add reject filter #1573
* Add deep search for filter taking in properties #1749
* Update branch with main
* Add `find`, `find_index`, `has`, and `reject` filters to arrays
* Refactor: avoid usage of public_send
---------
Co-authored-by: Anders Søgaard <[email protected] >
Co-authored-by: Anders Søgaard <[email protected] >
2025-01-14 10:33:31 +01:00
Michael Go
58777bcd93
float has to start with a digit
2025-01-13 17:13:27 -04:00
Michael Go
a07ae90523
use Ruby Hash as default expression cache
2025-01-10 15:07:57 -04:00
Michael Go
97cada61f9
remove Expression2 strscan workaround
2025-01-10 14:23:57 -04:00
Michael Go
d48708ae46
skip expression caching with Expression1
2025-01-07 14:32:46 -04:00
Michael Go
42d822bda9
users can provide optional expression cache
2025-01-07 14:32:46 -04:00
Michael Go
7c592c1c00
store StringScanner in ParseContext and reuse it through parsing
2025-01-07 14:32:45 -04:00
Michael Go
7c8a269b4d
fix cycle tag not resetting
2025-01-07 14:32:07 -04:00
Michael Go
0b1dc295ff
fix quirky negative sign expression markup parsing
2025-01-07 14:32:07 -04:00
Michael Go
8ecb703d4d
use StringScanner to improve Expression Parsing and Tokenizer
2025-01-07 14:32:06 -04:00
Ian Ker-Seymer and GitHub
63583ffe5b
Write one value at a time for array variables ( #1863 )
...
* Write one value at a time for array variables
* Handle recursive array
2024-12-11 10:16:58 -05:00
Michael Go
c77ff68573
clean up all warnings by using new Environment
2024-11-04 16:15:05 -04:00
Michael Go
3ed54bfdf9
propagate Environment on new Context creation
2024-11-04 15:32:07 -04:00
Michael Go
f6a3e25e2e
fix parsing quirky incomplete expressions
2024-10-30 13:44:35 -03:00
Ian Ker-Seymer and GitHub
b3553787c8
Speed up the lexer for Ruby 3.4+ ( #1832 )
...
* Speed up lexing
* Bump msrv to 3.0 (from 2.7)
* Normalize test for ruby-head compat
* Fix bug when parsing negative numbers
2024-10-23 14:15:33 -04:00
Alex Coco
9067e5167a
Handle interrupts in table row
2024-08-15 11:56:29 -04:00
Ian Ker-Seymer and GitHub
fb6634f454
Add concept of Liquid::Environment ( #1815 )
...
* Add concept of `Liquid::World`
* Rename `World` to `Environment`
2024-08-07 15:00:44 -04:00
Ian Ker-Seymer and GitHub
dba733084e
Merge pull request #1760 from mtasaka/nil-nil-comparison-fix
...
change: make nil_safe_casecmp judge compatible for nil-nil comparison
2024-03-21 15:38:13 -04:00
Michael Go
a5e5fab82a
update variable's context before invoking its to_liquid
2024-02-12 16:48:20 -04:00
Michael Go and GitHub
9b38a15282
Merge pull request #1776 from Shopify/refactor/invalid-encoding-error
...
add new TemplateEncodingError
2024-01-12 12:38:34 -04:00
Michael Go
7b25b770af
add new TemplateEncodingError
2024-01-12 12:17:20 -04:00
Michael Go
6a0fe3f7e3
convert template source to string to ensure encoding validity
2024-01-10 16:50:31 -04:00
Michael Go
730ad3684a
allow nil template source
2024-01-10 16:32:08 -04:00
Michael Go
369a6c55e3
check template UTF8 validity before parsing
2024-01-10 18:58:15 +00:00
Mamoru TASAKA
4924822c88
change: make nil_safe_casecmp judge compatible for nil-nil comparison
...
Ruby returns 0 (not nil) for nil <=> nil, i.e. nil and nil are judged
as equal for comparison, and so returns nil_safe_compare .
ref: https://github.com/Shopify/liquid/pull/1476
To make the behavior of nil_safe_casecmp consistent with
nil_safe_compare , change nil_safe_casecmp so that comparison between
nil <=> nil return 0 (equal).
Also change testsuite to reflect this change.
Fixes #1759 .
2023-12-15 15:09:57 +09:00
Guillaume Malette and GitHub
7b60b7fef5
Merge pull request #1746 from Shopify/gm/base64-encoding
...
[base64] Respect string encoding of input in base64_decode filters
2023-09-29 11:13:18 -04:00
Guillaume Malette
cc47fa8f03
[base64] Respect string encoding of input in base64_decode filters
2023-09-29 09:39:59 -04:00
Adam Klingbaum
75e7725f57
Streamline new tests for sum filter
2023-08-08 16:15:48 +00:00
James Prior and Adam Klingbaum
de6d15a73e
Test sum floats from properties.
2023-08-08 16:10:04 +00:00
James Prior and Adam Klingbaum
2c5d2be193
Don't render sum filter results in scientific notation.
2023-08-08 16:10:03 +00:00
Marco Rudilosso
21d6197533
Call to_liquid_value when short circuiting conditions
2023-07-19 15:22:12 +00:00