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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b2ddc5eedc353f83ee2cc3290c15777e20c8b1cc
4
- data.tar.gz: 236f9580708750658e5a0fc526d18a0b308ec6b7
3
+ metadata.gz: b3ea6a7f6eeb0ef34a869786c7c4d131a49020ef
4
+ data.tar.gz: 0f46918e58b9a95ee759fe72e511ea09ba00b67d
5
5
  SHA512:
6
- metadata.gz: 31124d52fb52b4c3132b777eeeef26ab610dad5e16bb7499139aa459d831450c1635f6edbc729242d5f9c85fadcdb028a2c1cc81f752d1afc48fcb21714a3f71
7
- data.tar.gz: b74df38862a40ccc4738da0ce3130c6734f4430487ba68d32a9624c01a6a69936e7174219b563f71e9d07763f552527b197cd5b6569080aa11f3974d9e11fe98
6
+ metadata.gz: f669d5adcdacba96e329474467f4edb7be5acd9ee333df5509539c5eb62912c65a77217588f2a9e31d23c6d5cd6775f5fd501e899f54b51d20d9e490f3b5982c
7
+ data.tar.gz: 4e71217fa8d2789934f09f96c003687740c1ee2d56dae3844164b9d8b7097e5a52785f8e59bd3515cc2b356b7ce114013a1ada912c759f6536be6956124fcd29
@@ -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), a|
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
- a << (v == true ? k.to_s : "#{k}=\"#{v}\"")
58
- end.join(" ")
62
+ hash ? out : out.join(" ")
59
63
  end
60
64
 
61
65
  # --
@@ -5,7 +5,7 @@
5
5
  module Liquid
6
6
  class Tag
7
7
  class Parser
8
- VERSION = "1.2.0"
8
+ VERSION = "1.3.0"
9
9
  end
10
10
  end
11
11
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: liquid-tag-parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordon Bedwell