liquid-tag-parser 1.2.0 → 1.3.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 +8 -4
- data/lib/liquid/tag/parser/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3ea6a7f6eeb0ef34a869786c7c4d131a49020ef
|
4
|
+
data.tar.gz: 0f46918e58b9a95ee759fe72e511ea09ba00b67d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f669d5adcdacba96e329474467f4edb7be5acd9ee333df5509539c5eb62912c65a77217588f2a9e31d23c6d5cd6775f5fd501e899f54b51d20d9e490f3b5982c
|
7
|
+
data.tar.gz: 4e71217fa8d2789934f09f96c003687740c1ee2d56dae3844164b9d8b7097e5a52785f8e59bd3515cc2b356b7ce114013a1ada912c759f6536be6956124fcd29
|
data/lib/liquid/tag/parser.rb
CHANGED
@@ -47,15 +47,19 @@ module Liquid
|
|
47
47
|
end
|
48
48
|
|
49
49
|
# --
|
50
|
-
def to_html(skip: [])
|
51
|
-
@args.each_with_object([]) do |(k, v),
|
50
|
+
def to_html(skip: [], hash: false)
|
51
|
+
out = @args.each_with_object(hash ? {} : []) do |(k, v), o|
|
52
52
|
next if k == :argv1 || skip.include?(k) ||
|
53
53
|
v == false || v.is_a?(Hash) ||
|
54
54
|
v.is_a?(Array)
|
55
55
|
|
56
|
+
o[k] = v if hash
|
57
|
+
unless hash
|
58
|
+
o << (v == true ? k.to_s : "#{k}=\"#{v}\"")
|
59
|
+
end
|
60
|
+
end
|
56
61
|
|
57
|
-
|
58
|
-
end.join(" ")
|
62
|
+
hash ? out : out.join(" ")
|
59
63
|
end
|
60
64
|
|
61
65
|
# --
|