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 +4 -4
- data/jekyll-wns.gemspec +1 -1
- data/lib/jekyll-wns/assets/label_pronounciation.rb +4 -6
- data/lib/jekyll-wns/register_hooks.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7779b77ba5167e129adbc39ad22637ac3c1147933b2022be8b85f11df48a058d
|
4
|
+
data.tar.gz: b0cca7b1f03693fa931e9c0bd53435f994dc9546bd8238ee52f9cd43549eb070
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66a106323738f47b582298e3291436fb92ce81e473d6f2f8b55a2b25e465b93709ce2a433aa8f9e1f3eac310f6a7ea077b9d7d25d6d8cd420fa64d5a2874de2f
|
7
|
+
data.tar.gz: 8361d9f635c4964906943b83945e8a45ebdf26d864c3f98aebf73088d5edb1e168db8bb8954083d572cba9da5f154045726bfab796889d98e31936e9c4e268ff
|
data/jekyll-wns.gemspec
CHANGED
@@ -8,12 +8,10 @@ module WNS
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def self.label_pronounciation!(doc)
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
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.
|
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-
|
11
|
+
date: 2022-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-mp3info
|