liquid 5.5.0 → 5.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/liquid/context.rb +1 -1
- data/lib/liquid/tags/cycle.rb +6 -0
- data/lib/liquid/tags/if.rb +1 -1
- data/lib/liquid/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0598b29e6fcedc82da9cda31e60387a4365e688fc23bee62ebdc5b57830453fd'
|
4
|
+
data.tar.gz: e3f0a880eafbb93c5a06ee6a5f82691fe0486b259c6407258382647aaf717b09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bee97a129194c9309265d15c6a076b2f3ff71732d5478901c218589eceec5c55779b2dad99de0a7061419d991974a253d3a8e095e7b98687f4de89e2bda52391
|
7
|
+
data.tar.gz: d28b48a963d1b5ebb753353a6c71e5c0226b5def5c7b46799b9019a80506c67fe7006ed296ba56ec117e7e33bc7af16f8d0ad1c60518de559d57f821a809ca85
|
data/lib/liquid/context.rb
CHANGED
@@ -27,7 +27,7 @@ module Liquid
|
|
27
27
|
@environments.flatten!
|
28
28
|
|
29
29
|
@static_environments = [static_environments].flatten(1).freeze
|
30
|
-
@scopes = [
|
30
|
+
@scopes = [outer_scope || {}]
|
31
31
|
@registers = registers.is_a?(Registers) ? registers : Registers.new(registers)
|
32
32
|
@errors = []
|
33
33
|
@partial = false
|
data/lib/liquid/tags/cycle.rb
CHANGED
@@ -26,14 +26,20 @@ module Liquid
|
|
26
26
|
when NamedSyntax
|
27
27
|
@variables = variables_from_string(Regexp.last_match(2))
|
28
28
|
@name = parse_expression(Regexp.last_match(1))
|
29
|
+
@is_named = true
|
29
30
|
when SimpleSyntax
|
30
31
|
@variables = variables_from_string(markup)
|
31
32
|
@name = @variables.to_s
|
33
|
+
@is_named = !@name.match?(/\w+:0x\h{8}/)
|
32
34
|
else
|
33
35
|
raise SyntaxError, options[:locale].t("errors.syntax.cycle")
|
34
36
|
end
|
35
37
|
end
|
36
38
|
|
39
|
+
def named?
|
40
|
+
@is_named
|
41
|
+
end
|
42
|
+
|
37
43
|
def render_to_output_buffer(context, output)
|
38
44
|
context.registers[:cycle] ||= {}
|
39
45
|
|
data/lib/liquid/tags/if.rb
CHANGED
@@ -111,7 +111,7 @@ module Liquid
|
|
111
111
|
def parse_binary_comparisons(p)
|
112
112
|
condition = parse_comparison(p)
|
113
113
|
first_condition = condition
|
114
|
-
while (op =
|
114
|
+
while (op = p.id?('and') || p.id?('or'))
|
115
115
|
child_condition = parse_comparison(p)
|
116
116
|
condition.send(op, child_condition)
|
117
117
|
condition = child_condition
|
data/lib/liquid/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: liquid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.5.
|
4
|
+
version: 5.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Lütke
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -38,7 +38,7 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
-
description:
|
41
|
+
description:
|
42
42
|
email:
|
43
43
|
- tobi@leetsoft.com
|
44
44
|
executables: []
|
@@ -115,7 +115,7 @@ licenses:
|
|
115
115
|
- MIT
|
116
116
|
metadata:
|
117
117
|
allowed_push_host: https://rubygems.org
|
118
|
-
post_install_message:
|
118
|
+
post_install_message:
|
119
119
|
rdoc_options: []
|
120
120
|
require_paths:
|
121
121
|
- lib
|
@@ -130,8 +130,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: 1.3.7
|
132
132
|
requirements: []
|
133
|
-
rubygems_version: 3.5.
|
134
|
-
signing_key:
|
133
|
+
rubygems_version: 3.5.16
|
134
|
+
signing_key:
|
135
135
|
specification_version: 4
|
136
136
|
summary: A secure, non-evaling end user template engine with aesthetic markup.
|
137
137
|
test_files: []
|