liquid 5.8.2 → 5.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/liquid/standardfilters.rb +6 -4
- data/lib/liquid/tags/decrement.rb +1 -1
- data/lib/liquid/tags/include.rb +1 -1
- data/lib/liquid/tags/increment.rb +1 -1
- data/lib/liquid/tags/render.rb +1 -1
- data/lib/liquid/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb3ff5ebbdba41e779d9f36565fe3331aa83abe4ff382ff13a6b4df0f64168e4
|
4
|
+
data.tar.gz: 2cf06ebce1bb089de5c57af9e3e65020f2b4fbc1b34c567867279f74983e2482
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e970f6c89af0a8b593d714ddc8c9328893a7703d39cc9e8937ccc838538fee13de85c62390bf610af7e85bb30d91b328fba2f9e388a9c67b00ddaaf374939973
|
7
|
+
data.tar.gz: 4f6f8a3b237ee1146debb6994278d9a39bc0da045b7e2eaeabea8f5dac2a4a71d434c3d2b69f55f6dc8e8619801bfa7795a97dae8cc9e073ee474007a6f58067
|
@@ -3,7 +3,6 @@
|
|
3
3
|
require 'cgi'
|
4
4
|
require 'base64'
|
5
5
|
require 'bigdecimal'
|
6
|
-
|
7
6
|
module Liquid
|
8
7
|
module StandardFilters
|
9
8
|
MAX_I32 = (1 << 31) - 1
|
@@ -538,6 +537,10 @@ module Liquid
|
|
538
537
|
# @liquid_return [array[untyped]]
|
539
538
|
def map(input, property)
|
540
539
|
property = Utils.to_s(property)
|
540
|
+
|
541
|
+
# Return the input array if property is empty (no-op)
|
542
|
+
return InputIterator.new(input, context).to_a if property.empty?
|
543
|
+
|
541
544
|
InputIterator.new(input, context).map do |e|
|
542
545
|
e = e.call if e.is_a?(Proc)
|
543
546
|
|
@@ -986,12 +989,11 @@ module Liquid
|
|
986
989
|
attr_reader :context
|
987
990
|
|
988
991
|
def filter_array(input, property, target_value, default_value = [], &block)
|
989
|
-
property = Liquid::Utils.to_s(property)
|
990
|
-
return default_value if property.empty?
|
991
|
-
|
992
992
|
ary = InputIterator.new(input, context)
|
993
993
|
return default_value if ary.empty?
|
994
994
|
|
995
|
+
property = Utils.to_s(property)
|
996
|
+
|
995
997
|
block.call(ary) do |item|
|
996
998
|
if target_value.nil?
|
997
999
|
item[property]
|
@@ -10,7 +10,7 @@ module Liquid
|
|
10
10
|
# @liquid_description
|
11
11
|
# Variables that are declared with `decrement` are unique to the [layout](/themes/architecture/layouts), [template](/themes/architecture/templates),
|
12
12
|
# or [section](/themes/architecture/sections) file that they're created in. However, the variable is shared across
|
13
|
-
# [snippets](/themes/architecture
|
13
|
+
# [snippets](/themes/architecture/snippets) included in the file.
|
14
14
|
#
|
15
15
|
# Similarly, variables that are created with `decrement` are independent from those created with [`assign`](/docs/api/liquid/tags/assign)
|
16
16
|
# and [`capture`](/docs/api/liquid/tags/capture). However, `decrement` and [`increment`](/docs/api/liquid/tags/increment) share
|
data/lib/liquid/tags/include.rb
CHANGED
@@ -6,7 +6,7 @@ module Liquid
|
|
6
6
|
# @liquid_category theme
|
7
7
|
# @liquid_name include
|
8
8
|
# @liquid_summary
|
9
|
-
# Renders a [snippet](/themes/architecture
|
9
|
+
# Renders a [snippet](/themes/architecture/snippets).
|
10
10
|
# @liquid_description
|
11
11
|
# Inside the snippet, you can access and alter variables that are [created](/docs/api/liquid/tags/variable-tags) outside of the
|
12
12
|
# snippet.
|
@@ -10,7 +10,7 @@ module Liquid
|
|
10
10
|
# @liquid_description
|
11
11
|
# Variables that are declared with `increment` are unique to the [layout](/themes/architecture/layouts), [template](/themes/architecture/templates),
|
12
12
|
# or [section](/themes/architecture/sections) file that they're created in. However, the variable is shared across
|
13
|
-
# [snippets](/themes/architecture
|
13
|
+
# [snippets](/themes/architecture/snippets) included in the file.
|
14
14
|
#
|
15
15
|
# Similarly, variables that are created with `increment` are independent from those created with [`assign`](/docs/api/liquid/tags/assign)
|
16
16
|
# and [`capture`](/docs/api/liquid/tags/capture). However, `increment` and [`decrement`](/docs/api/liquid/tags/decrement) share
|
data/lib/liquid/tags/render.rb
CHANGED
@@ -6,7 +6,7 @@ module Liquid
|
|
6
6
|
# @liquid_category theme
|
7
7
|
# @liquid_name render
|
8
8
|
# @liquid_summary
|
9
|
-
# Renders a [snippet](/themes/architecture
|
9
|
+
# Renders a [snippet](/themes/architecture/snippets) or [app block](/themes/architecture/sections/section-schema#render-app-blocks).
|
10
10
|
# @liquid_description
|
11
11
|
# Inside snippets and app blocks, you can't directly access variables that are [created](/docs/api/liquid/tags/variable-tags) outside
|
12
12
|
# of the snippet or app block. However, you can [specify variables as parameters](/docs/api/liquid/tags/render#render-passing-variables-to-a-snippet)
|
data/lib/liquid/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: liquid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.8.
|
4
|
+
version: 5.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Lütke
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-04-04 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: strscan
|