jekyll-wns 4.2.3 → 4.2.4
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 +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb627baf34799ff128961bfb4951d0ad258a585d9f2055ab6778ce6c1b96bc35
|
4
|
+
data.tar.gz: 335effd443906c28d24a8deaefe4ca74374df1430d1d52810942b49ee136bcc6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a373750c9f956015afb529a83c9042e0006964247b29e90c94df33af293f209c45e99ec8d226792128bf6fc595e2c91ae331e805ca4f947f13c1ef7c62b3a086
|
7
|
+
data.tar.gz: ef3de6123b8a3aa2d7a2a70dd35a1789f5fe77c886ed22f9ef625a992354858c8187a996ff7032ece5d28ec7d14bfeba30b25a772cc24cb2f178e25da283a0a3
|
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"] || false
|
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
|