sutty-liquid 0.13.0rc0 → 0.13.0rc2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1f96ce75462f98f6147c38e1b6bf0009622b5109f153718ed85cd52c1ed841bb
4
- data.tar.gz: 627f2bb07b8a03bed5d93dfe76f0310cda4e857a529c60fd5e0d821a146f75b0
3
+ metadata.gz: 127321ae28d659af872b8a4b0c9c9b27071df190d6ca10acb90b2989fa47f5d5
4
+ data.tar.gz: 21c57743c4edee2a63a9086374e90580126a93eb4f6de879b59f5deaee9f98f1
5
5
  SHA512:
6
- metadata.gz: 59a6879d4609e886e7c13da7ad84d94a122f633a20d5aef741ad5b59616c69ebdab0364174afbc59b383782fdcfdadeb9a21869801ca649db3854187d3d61985
7
- data.tar.gz: f4033d00a442ad63b7e44e8c741983f5a0ec30e2d96a26adea70bdc24bb2a395946917a581fe0d5a398eabcb310c1e9a05e2a1d38268b7b260669760454a7b16
6
+ metadata.gz: 6f497a18cddcb08f2c8760dc30c611f093a5245f5a0b8e763242d2ec492bdf9d25bbc1fb88276de672f1b7145d12df9a486c1eb5f6a3366e44adab20a6bbe20f
7
+ data.tar.gz: 0dd56e2228ac34a90190655733169e1204eb9598217e38ff7c4d9ae461d9a64026dd0a0c416788a5b92268c20d7b5541a2ba5f3c5037a8a3fbf99cf77f0ff0a8
checksums.yaml.gz.sig CHANGED
Binary file
@@ -66,7 +66,8 @@ module Jekyll
66
66
  CGI.unescapeHTML input.to_s
67
67
  end
68
68
 
69
- # Escapes a string by percent encoding all reserved characters
69
+ # Escapes a string by percent encoding all reserved characters,
70
+ # including `#`
70
71
  #
71
72
  # @param :input [Any]
72
73
  # @return [String]
@@ -74,7 +75,7 @@ module Jekyll
74
75
  require 'addressable'
75
76
 
76
77
  @@component_escape ||= {}
77
- @@component_escape[input.to_s] ||= Addressable::URI.parse(input.to_s).normalize.to_s
78
+ @@component_escape[input.to_s] ||= Addressable::URI.parse(input.to_s).normalize.to_s.sub("#", "%23")
78
79
  end
79
80
 
80
81
  # Sanitizes HTML. By default follows Sutty CMS allowlist.
@@ -18,6 +18,7 @@ module Jekyll
18
18
  # @return [String]
19
19
  def yaml_to_scss(yaml, schema = yaml)
20
20
  yaml = yaml.to_h if yaml.is_a? Jekyll::Drops::DocumentDrop
21
+ yaml = {} if yaml.nil?
21
22
 
22
23
  unless yaml.is_a? Hash
23
24
  raise Liquid::ArgumentError, "#{yaml.inspect} needs to be a Hash" if @context.strict_filters
@@ -33,8 +34,22 @@ module Jekyll
33
34
  keys = keys - reject_keys
34
35
  end
35
36
 
37
+ keys.each do |key|
38
+ yaml[key] ||= nil
39
+ end
40
+
36
41
  yaml.slice(*keys).map do |key, value|
37
- next if value.nil?
42
+ if value.nil?
43
+ Jekyll.logger.warn 'YAML to SCSS:', "#{key} getting default value from schema"
44
+
45
+ value = schema.dig(key, 'default', site.locale)
46
+ value ||= schema.dig(key, 'default', site.default_locale)
47
+ end
48
+
49
+ if value.nil? || (value.respond_to?(:empty?) && value.empty?)
50
+ Jekyll.logger.warn 'YAML to SCSS:', "#{key} value is nil or empty"
51
+ next
52
+ end
38
53
 
39
54
  escape = schema[key].is_a?(Hash) && %w[image file].include?(schema.dig(key, 'type'))
40
55
  key = key_to_scss key
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sutty-liquid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0rc0
4
+ version: 0.13.0rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - f
@@ -35,7 +35,7 @@ cert_chain:
35
35
  cpurTQHNJfL/ah+9dYbgDXdG5HAAjRMAsWSvERw95YdN9XzQZCdUk5wUs+A6cNtO
36
36
  AZZUMTVYNx8JqUeemxlXBRjsD/s=
37
37
  -----END CERTIFICATE-----
38
- date: 2025-07-30 00:00:00.000000000 Z
38
+ date: 2025-08-30 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: fast_blank
metadata.gz.sig CHANGED
Binary file