liquid-tag-parser 1.7.0 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/liquid/tag/parser.rb +10 -4
- data/lib/liquid/tag/parser/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c057e184a8a4d338d450a92300d8f8439394b713
|
4
|
+
data.tar.gz: ca40ca9c306136b8b60d2b06c666d7990b8b746e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d7330b46478d605bde569c1690e955384738e4a24cb66fb1edd69502f5054468f94610dde91853706ea9cdcb8d7ecbd530d0779f18afe99e9bdf57ae95cb967
|
7
|
+
data.tar.gz: 23a809b5033f64da2ac0fa1d2b53b5eb2d1be27fcb4283bf89025c8e66ee7a205321b1ec5a3cc5b9e73f8f579faddbf85f7466c3d6fde6f337c31397664de7cc
|
data/lib/liquid/tag/parser.rb
CHANGED
@@ -118,7 +118,7 @@ module Liquid
|
|
118
118
|
private
|
119
119
|
def argv1(i:, k:, v:)
|
120
120
|
if i.zero? && k.empty? && v !~ BOOL && v !~ @sep_regexp
|
121
|
-
@args[:argv1] = convert(v)
|
121
|
+
@args[:argv1] = unescape(convert(v))
|
122
122
|
end
|
123
123
|
end
|
124
124
|
|
@@ -154,15 +154,21 @@ module Liquid
|
|
154
154
|
out
|
155
155
|
end
|
156
156
|
|
157
|
+
private
|
158
|
+
def unescape(val)
|
159
|
+
return unless val
|
160
|
+
val.gsub(@escaped_sep_regexp, @unescaped_sep).gsub(
|
161
|
+
SPECIAL_ESCAPED, "\\1")
|
162
|
+
end
|
163
|
+
|
157
164
|
# --
|
158
165
|
private
|
159
166
|
def parse
|
160
167
|
from_shellwords.each_with_index do |k, i|
|
161
168
|
keys, _, val = k.rpartition(@sep_regexp)
|
162
|
-
val.gsub!(@escaped_sep_regexp, @unescaped_sep)
|
163
|
-
val.gsub!(SPECIAL_ESCAPED, "\\1")
|
164
|
-
|
165
169
|
next if argv1(i: i, k: keys, v: val)
|
170
|
+
|
171
|
+
val = unescape(val)
|
166
172
|
keys, val = flip_kv_bool(val) if val =~ BOOL && keys.empty?
|
167
173
|
keys, val = val, nil if keys.empty?
|
168
174
|
keys = keys.split(KEY).map(&:to_sym)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: liquid-tag-parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jordon Bedwell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|