jekyll-wns 4.2.3 → 4.2.6

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
  SHA256:
3
- metadata.gz: 7b8350877bd321d5dfac3f0dccfa0948b465c4e6da9bbab5940ac7632b78f276
4
- data.tar.gz: 4c6b98b9e49be9ef52676690a3d852267f5f399780b2e11fa3d91324418cccb5
3
+ metadata.gz: 7779b77ba5167e129adbc39ad22637ac3c1147933b2022be8b85f11df48a058d
4
+ data.tar.gz: b0cca7b1f03693fa931e9c0bd53435f994dc9546bd8238ee52f9cd43549eb070
5
5
  SHA512:
6
- metadata.gz: 1ca1721d9cba746a21c27d2cd7a5c3ba838174895a8f395379f56997e66e540652032deae64a0e23ed4ab428c165e8ee5af88a41d69d551da256d4bab3e3a702
7
- data.tar.gz: 9f3d4c16938369be6fcbb8166c5563b1d846862cb43a4168e57acbe5c159d2b5a89966a44949ccfbb29fd691aa6fd4da645a29a33621a697b29ff4ec39cc2bdf
6
+ metadata.gz: 66a106323738f47b582298e3291436fb92ce81e473d6f2f8b55a2b25e465b93709ce2a433aa8f9e1f3eac310f6a7ea077b9d7d25d6d8cd420fa64d5a2874de2f
7
+ data.tar.gz: 8361d9f635c4964906943b83945e8a45ebdf26d864c3f98aebf73088d5edb1e168db8bb8954083d572cba9da5f154045726bfab796889d98e31936e9c4e268ff
data/jekyll-wns.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "jekyll-wns"
5
- spec.version = "4.2.3"
5
+ spec.version = "4.2.6"
6
6
  spec.authors = ["Thai Chung"]
7
7
  spec.email = ["mail@0xReki.de"]
8
8
  spec.summary = "Collection of Filters, Tags and Hooks I use."
@@ -8,12 +8,10 @@ module WNS
8
8
  end
9
9
 
10
10
  def self.label_pronounciation!(doc)
11
- if LabelPronounciation::enabled?(doc)
12
- wns = doc.site.config["wns"] || {}
13
- labels = wns["label_pronounciation"] || false
14
- for i in (0..(labels.length()) - 1) do
15
- doc.content = doc.content.gsub(Regexp.new("\b(#{labels[i]["term"]})\b"), "<span aria-label='#{labels[i]["pronounciation"]}'>\\1</span>")
16
- end
11
+ wns = doc.site.config["wns"] || {}
12
+ labels = wns["label_pronounciation"] || []
13
+ for i in (0..(labels.length()) - 1) do
14
+ doc.content = doc.content.gsub(Regexp.new("\b(#{labels[i]["term"]})\b"), "<span aria-label='#{labels[i]["pronounciation"]}'>\\1</span>")
17
15
  end
18
16
  end
19
17
  end
@@ -9,7 +9,7 @@ end
9
9
 
10
10
  Jekyll::Hooks.register :pages, :post_render do |document|
11
11
  if document.path =~ /(.md|.html)/
12
- WNS::LabelPronounciation::label_pronounciation document
12
+ WNS::LabelPronounciation::label_pronounciation! document
13
13
  end
14
14
  end
15
15
 
@@ -20,5 +20,5 @@ Jekyll::Hooks.register :posts, :pre_render do |document|
20
20
  end
21
21
 
22
22
  Jekyll::Hooks.register :posts, :post_render do |document|
23
- WNS::LabelPronounciation::label_pronounciation document
23
+ WNS::LabelPronounciation::label_pronounciation! document
24
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-wns
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.3
4
+ version: 4.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thai Chung
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-03 00:00:00.000000000 Z
11
+ date: 2022-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-mp3info