Anders Søgaard
45f186b4df
Remove string formatter
2021-09-17 08:33:59 +02:00
5187399fd4
Update lib/liquid/standardfilters.rb
...
Co-authored-by: Dylan Thacker-Smith <[email protected] >
2021-09-17 08:26:16 +02:00
Anders Søgaard and GitHub
f17c49776d
Merge branch 'Shopify:master' into master
2021-09-16 19:14:10 +02:00
Anders Søgaard
aead4c5daa
Refactor filter
2021-09-16 19:10:50 +02:00
Marc-André Cournoyer and GitHub
10e2aa8d5b
Merge pull request #1471 from Shopify/bump-5.1.0
...
Prep for 5.1.0 release
2021-09-15 15:15:13 -04:00
Anders Søgaard
e3c82a9e4e
Favor unless over if for negative conditions
2021-09-13 18:07:29 +02:00
Anders Søgaard
986391cb7d
start_index will never be -1
2021-09-13 18:00:03 +02:00
Anders Søgaard
b5abd145e3
Remove default value for replacement argument
2021-09-10 18:02:35 +02:00
Anders Søgaard
dc7818f371
Update filter to use rindex
2021-09-10 09:55:08 +02:00
Anders Søgaard
f72cfb13ab
Delegate functions to corresponding replace functions
2021-09-10 08:24:50 +02:00
Marc-André Cournoyer
b01de9d325
Prep for 5.1.0 release
2021-09-09 14:28:45 -04:00
Zac Clay and GitHub
a5369c26a8
Add missing quote in comment ( #1468 )
2021-09-09 14:23:11 -04:00
Charles-P. Clermont
e86fe27259
Fix lint
2021-09-09 11:22:39 -04:00
Charles-P. Clermont
c8906d05b9
Add ParseTreeVisitor to RangeLookup
2021-09-09 11:22:39 -04:00
Anders Søgaard and GitHub
973aa9f1b5
Merge branch 'Shopify:master' into master
2021-09-09 08:59:07 +02:00
Michael Go and GitHub
50d1a2ffc9
Merge pull request #1458 from Shopify/use-to-liquid-value-with-conditions
...
use Utils.to_liquid_value on conditionals
2021-06-15 12:18:14 -03:00
Michael Go
f686c5dec7
use Utils.to_liquid_value on conditionals
2021-06-14 18:19:37 -03:00
Michael Go and GitHub
aa8ce87b96
Merge pull request #1454 from Shopify/default-filter-with-to-liquid-value
...
utilize input's to_liquid_value on default filter
2021-06-14 15:43:56 -03:00
Michael Go
edd4d70aee
fix unless to use to_liquid_value helper with multiple conditions
2021-06-10 13:28:17 -03:00
Michael Go
ac66dbbafe
utilize input's to_liquid_value on default filter
2021-06-08 15:20:53 -03:00
Daniel Insley and GitHub
017c1b5e83
Base64 Decode & Encode Filters ( #1450 )
2021-06-03 13:23:11 -04:00
Michael Go
e361a4d53c
introduce to_liquid_value on variable look and conditional statements
2021-05-26 17:27:18 -03:00
Dylan Thacker-Smith and GitHub
cfe1637bdd
Translate RangeError to Liquid::Error for truncatewords with large int ( #1431 )
2021-04-20 11:48:22 -04:00
Anders Søgaard
7754a0fbee
Use correct method
2021-03-30 12:37:44 +02:00
Anders Søgaard
e575c1f131
Add replace_last and remove_last filters
2021-03-30 12:34:01 +02:00
Dylan Thacker-Smith
eab13a07d9
Add changelog entry for a recent fix
2021-03-29 13:43:01 -07:00
Dylan Thacker-Smith and GitHub
ca96ca0fef
Fix support for using a String subclass for the liquid source ( #1421 )
2021-03-29 16:22:05 -04:00
Marc-André Cournoyer
026157e128
Bump to 5.0.1 and add changelog for release
2021-03-24 16:19:19 -04:00
Charles-P. Clermont
c270a6f378
Add ParseTreeVisitor to Echo tag
...
This fixes theme-check#218, wherein variables used in echo tags are not
considered used by the linter. It is because our visitor doesn't see the
:variable_lookup's in the echo tag since the children array is empty.
But this array is empty because it is swallowed by the @variable.
2021-03-24 09:35:43 -04:00
Dylan Thacker-Smith and GitHub
dcb5a67089
performance: Use split limit in truncatewords ( #1361 )
2021-02-19 13:11:35 -05:00
Unending
3cae09b968
handle carriage return in newlines_to_br
2021-01-16 18:49:01 +01:00
Dylan Thacker-Smith and GitHub
260c863e23
Build the tokenizer through the parse context for liquid-c ( #1386 )
2021-01-07 14:51:41 -05:00
Marc-André Cournoyer
22683cbd2a
Bump version to 5.0.0
...
Bump major because of the numerous breaking changes.
2021-01-05 15:02:14 -05:00
Peter Zhu
51e8d6234a
Freeze blocks in reverse order
2020-12-16 15:18:34 -05:00
Peter Zhu
7ca2846d9c
Move configure options to a method
2020-12-16 15:08:55 -05:00
Dylan Thacker-Smith and GitHub
7ba0fc7952
Merge pull request #1376 from Shopify/support-app-liquid-context
...
Use the same context class for isolated subcontexts for the require tag
2020-12-14 12:12:46 -05:00
Dylan Thacker-Smith
40a9b72b3c
Allow a block to finish context init before squashing instance assigns
...
Liquid::Context#squash_instance_assigns_with_environments can result in
Proc objects in the environment to be eagerly evaluated. So it should be
possible to finish initializing the context object before this is done.
Allowing a block to be used for this purpose avoids the need to add
additional parameters for this purpose.
2020-12-11 14:52:09 -05:00
Dylan Thacker-Smith
4ff26cd707
Use the same context class for isolated subcontexts for the require tag
2020-12-11 14:52:09 -05:00
Dylan Thacker-Smith
da581d988a
Create top-level profile timing nodes for multiple template renders
2020-12-09 10:06:02 -05:00
Dylan Thacker-Smith
896288eff1
Move start of profiling to a Document#render_to_output_buffer patch
2020-12-09 10:04:34 -05:00
Dylan Thacker-Smith
b3f132efd1
Fix total_render_time if a Profiler gets used for multiple renders
2020-12-09 10:04:34 -05:00
Dylan Thacker-Smith and GitHub
60214b957c
Store the profiler in the context instead of a thread-local variable ( #1364 )
2020-12-09 10:04:20 -05:00
Dylan Thacker-Smith
cb2ad71a31
Remove the Profiler#initialize argument which is effectively now unused
...
The @root_timing Timing object that it was used with never exposed that
name.
2020-12-09 10:01:16 -05:00
Dylan Thacker-Smith
900e3a6491
Fix template name in profile result for render tag timing objects
2020-12-09 10:01:16 -05:00
Dylan Thacker-Smith and GitHub
f18084203d
Use monotonic time to measure durations in Liquid::Profiler ( #1362 )
2020-12-09 10:00:44 -05:00
Peter Zhu
bbfcaa2cc0
Revert "Merge pull request #1350 from Shopify/pz-instrument-invalid-end-tag"
...
This reverts commit e6eef4b2c4 , reversing
changes made to c7c21e88f0 .
2020-12-01 14:38:04 -05:00
Peter Zhu
ba657871bc
Revert "Merge pull request #1359 from Shopify/pz-instrument-range-floats"
...
This reverts commit 300adfd7ae , reversing
changes made to ed0aebcbc9 .
2020-12-01 14:37:23 -05:00
Peter Zhu
0a645e72c1
Freeze the body for case
2020-11-27 11:29:17 -05:00
Dylan Thacker-Smith and GitHub
1850511334
Use an atomic subgroup in range regex to avoid pathological backtracking ( #1360 )
2020-11-16 10:29:36 -05:00
Peter Zhu
f357662f37
Instrument floats in ranges
2020-11-13 16:05:29 -05:00