liquid 5.7.2 → 5.7.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/History.md +3 -1
- data/lib/liquid/lexer.rb +6 -0
- data/lib/liquid/standardfilters.rb +1 -1
- data/lib/liquid/tokenizer.rb +6 -0
- 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: 914cff799e3bd2ac8b59184ae521d8b8eccce15ee3d0dac103e471bcab5f1255
|
4
|
+
data.tar.gz: 38b104ec712e953540ab7316ce2e4cfac13a5964f5bc32ca39bc1252b908ac43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7c7f4e17b845a60ef8d7e2bf21b5378f5c116806ca62bb5f310b595275b3080294e378ea57bf2d70f35809ff4570142ccc77a62f0ac1c0afdd629ae6b1a5980
|
7
|
+
data.tar.gz: 48b4101e4e4c293ae10ef34ef701c8fcc3bbf764a55eca7b5a1022b95fa8f7e64d13f1e7ecc9cae5f456c12f30de9172baed90016de088384ec6847950a711b4
|
data/History.md
CHANGED
data/lib/liquid/lexer.rb
CHANGED
@@ -161,6 +161,12 @@ module Liquid
|
|
161
161
|
end
|
162
162
|
# rubocop:enable Metrics/BlockNesting
|
163
163
|
output << EOS
|
164
|
+
rescue ::ArgumentError => e
|
165
|
+
if e.message == "invalid byte sequence in #{ss.string.encoding}"
|
166
|
+
raise SyntaxError, "Invalid byte sequence in #{ss.string.encoding}"
|
167
|
+
else
|
168
|
+
raise
|
169
|
+
end
|
164
170
|
end
|
165
171
|
|
166
172
|
def raise_syntax_error(start_pos, ss)
|
@@ -456,7 +456,7 @@ module Liquid
|
|
456
456
|
# Tests if any item in an array has a specific property value.
|
457
457
|
# @liquid_description
|
458
458
|
# This requires you to provide both the property name and the associated value.
|
459
|
-
# @liquid_syntax array |
|
459
|
+
# @liquid_syntax array | has: string, string
|
460
460
|
# @liquid_return [boolean]
|
461
461
|
def has(input, property, target_value = nil)
|
462
462
|
filter_array(input, property, target_value, false) { |ary, &block| ary.any?(&block) }
|
data/lib/liquid/tokenizer.rb
CHANGED
@@ -103,6 +103,12 @@ module Liquid
|
|
103
103
|
|
104
104
|
pos = @ss.pos -= 2
|
105
105
|
@source.byteslice(start, pos - start)
|
106
|
+
rescue ::ArgumentError => e
|
107
|
+
if e.message == "invalid byte sequence in #{@ss.string.encoding}"
|
108
|
+
raise SyntaxError, "Invalid byte sequence in #{@ss.string.encoding}"
|
109
|
+
else
|
110
|
+
raise
|
111
|
+
end
|
106
112
|
end
|
107
113
|
|
108
114
|
def next_variable_token
|
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.7.
|
4
|
+
version: 5.7.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-02-24 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: strscan
|