liquid-tag-parser 1.0.2 → 1.1.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: 49745411e166434c3e9f92524daf80266c42522a
4
- data.tar.gz: f9b7ffb095609af5d89659b478a22d30d67d9597
3
+ metadata.gz: 79a95da9a9ff6492e2d8dc4219744588b896db80
4
+ data.tar.gz: 452e2c797b3b7bb85ccde0acee140ca3b9a33983
5
5
  SHA512:
6
- metadata.gz: 90675c7226768aba373d4c9e2a2cb224b101f835a21ed32ad10487d63cbe8588c3b3b4177e16668ea097fbf8feab0b5dfccbd60a299af785e1aa2e279e152e75
7
- data.tar.gz: 84c0c8c51ceb5969c588ffef10016579f47811184e67ae9d185d8b0e4dea9c9405fbec2c2b0eb899e3a1f91edca24a84a515f365280d37cea9e912d9f55e5ca4
6
+ metadata.gz: 1543e498250b9151fbc1023ea0568a5a21dfb1adb890f70307748c7e28bbf6882b5d35eb1f4e0caa5bdb2e4eec806f23cdfc03b05507017119f937cca267fd7d
7
+ data.tar.gz: b22b19eb2f06849346b5fa12119370b95bfff68b1cec5554f95c02ba5b0dfd3bb6c3d2a5a404e05520ffd8ed3e767785349b45eed6b9fd434407d8ba6c63b513
@@ -66,16 +66,15 @@ module Liquid
66
66
 
67
67
  @args = @defaults.deep_merge(args.each_with_object(hash) do |k, h, out = h|
68
68
  keys, _, val = k.rpartition(@sep_regexp)
69
- keys = keys.split(KEY_REGEXP).map(&:to_sym)
70
- val = val.gsub(@escaped_sep_regexp, @sep)
71
69
 
72
- # @true, @false will not split or map right.
73
- if keys.size == 0 && val =~ BOOLEAN_REGEXP
74
- keys = [
75
- val
76
- ]
70
+ val = val.gsub(@escaped_sep_regexp, @sep)
71
+ if keys.empty? && val =~ BOOLEAN_REGEXP
72
+ # @true, @false will not map right.
73
+ keys = val.gsub(BOOLEAN_REGEXP, "")
74
+ end
77
75
 
78
- elsif keys.size > 1
76
+ keys = keys.split(KEY_REGEXP).map(&:to_sym)
77
+ if keys.size > 1
79
78
  h = h[keys[0]] ||= {}
80
79
  keys[1...-1].each do |sk|
81
80
  h = h[sk] ||= {}
@@ -89,7 +88,7 @@ module Liquid
89
88
  val = val.to_i if val =~ /^\d+$/
90
89
  val = true if val == "true"
91
90
 
92
- key = keys.last.to_s.gsub(BOOLEAN_REGEXP, "").to_sym
91
+ key = keys.last.to_sym
93
92
  h[key] << val if h[key].is_a?(Array)
94
93
  h[key] = [h[key]] << val if h[key]
95
94
  h[key] = val unless h[key]
@@ -5,7 +5,7 @@
5
5
  module Liquid
6
6
  class Tag
7
7
  class Parser
8
- VERSION = "1.0.2"
8
+ VERSION = "1.1.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.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordon Bedwell