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
Marco Concetto Rudilosso
7f2cf1fe67
Recursively parse for liquid tag
2023-07-07 11:20:34 +01:00
Marco Concetto Rudilosso
10e0fb795e
Allow liquid tag inside liquid tag
2023-07-06 10:45:12 +01:00
Adam Klingbaum
98ce25cb40
Ensure sum filter calls to_liquid
2023-06-22 16:25:11 +00:00
Adam Klingbaum
af66bc8a5f
Add sum filter to standard filters
2023-06-19 19:11:05 +00:00
Guillaume Malette
649cca1349
[trim] Fix trimming at end of raw block when specified in the opening tag
2023-05-19 11:41:45 -04:00
Michael Go
1d97389fb0
render template name with Liquid Syntax errors
2023-03-02 16:50:55 -04:00
Michael Go
24dceef552
set context's template_name with template's name
2023-02-28 10:55:38 -04:00
Michael Go
428c66ffac
add name attribute to Template for more flexibility to set context's template name
2023-02-27 17:11:52 -04:00
Michael Go
0fe4a5d144
render error message with actual template path
2023-02-27 11:01:21 -04:00
Guilherme Carreiro and GitHub
9ab688eada
Update rubocop-shopify (2.7.0 -> 2.12.0) ( #1687 )
2023-02-15 08:40:59 +01:00
Michael Go and GitHub
4599e5459f
Merge pull request #1684 from Shopify/fix-variable-lookup-parse-timeout
...
fix variable lookup parse timing out with missing closing bracket
2023-02-02 10:39:46 -04:00
Dylan Thacker-Smith and GitHub
59c445f0e1
Avoid a couple of duplicate assertions ( #1675 )
2023-02-02 09:31:01 -05:00
Michael Go
bd9c3802c8
add variable parser timeout unit tests
2023-02-01 21:15:35 -04:00
Michael Go
2b40850e4a
fix variable lookup parse timing out with missing closing bracket
2023-02-01 19:52:30 -04:00
Marco Concetto Rudilosso
ddc32b7bd8
actually test whitespace stripping
2023-02-01 15:52:34 +00:00
Marco Concetto Rudilosso
74e505f6fa
Allow raw tag to be used with whitespace control
2023-02-01 13:49:51 +00:00
Michael Go
dd257b3d66
add an unit test for double nest variable lookup
2023-01-30 20:36:14 -04:00
Michael Go
1aaf6ed019
recursively parse brackets on variable lookup
2023-01-30 20:19:35 -04:00
Michael Go
0f11c97623
raise invalid integer argument error from tablerow
2023-01-16 18:53:53 -04:00
Dylan Thacker-Smith
619ed3fcd7
Add some additional to_liquid_value assertions
2023-01-13 15:46:12 -05:00
Dylan Thacker-Smith and GitHub
bf711a0521
Provide another assertion for to_liquid_value unless tag test ( #1672 )
...
Since the original one would pass even if to_liquid_value isn't called on
the BooleanDrop object.
2023-01-11 14:05:27 -05:00
Dylan Thacker-Smith and GitHub
c2c6cb2b15
Allow commas to separate for tag attributes ( #1658 )
...
For consistency with tags like the `render` tag, where we actually
prefer to use commas to separate attributes
2022-11-29 09:00:55 -05:00
Dylan Thacker-Smith and GitHub
1cd5ec54f0
Merge pull request #1641 from Shopify/assert-template-result-static-env
...
Use static environment assert_template_result input values
2022-11-02 10:05:52 -04:00
Peter Zhu
abed47547c
Fix tags in comment
2022-11-01 13:04:41 -04:00
Dylan Thacker-Smith
db8e85ab31
Prevent an internal error in include tag from non-string template_name
...
which would otherwise happen on `template_name.split('/')`
2022-10-28 13:59:00 -04:00
Dylan Thacker-Smith and GitHub
96b5325f87
Remove Usage.increment calls that have been shown to in fact be used ( #1645 )
...
I think these were added for undocumented features to see if they were
actually used and they were being used.
2022-10-26 09:21:43 -04:00
Dylan Thacker-Smith and GitHub
6ce4ec1011
tablerow: Avoid accidental special case for constant nil cols ( #1644 )
...
It should behave the same as an expression that evaluates to nil
2022-10-25 10:21:03 -04:00
Dylan Thacker-Smith
2c2f5826d5
Change increment/decrement tests to avoid relying on input
...
So these can be tested using language tests, without needing support
for counter value input, which isn't needed if input is provided
through the static environment.
2022-10-21 11:43:58 -04:00
Dylan Thacker-Smith
c0c191cabd
Add assertions for truncate filter with large integers
2022-10-11 12:44:33 -04:00