jekyll-link-decorator 1.2.0 → 1.2.2
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 +4 -4
- data/lib/jekyll-link-decorator.rb +9 -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: 33285c1668a0edb31f7be980cd4f810232337bd0b627e0b8969349195ebede3e
|
|
4
|
+
data.tar.gz: e239a936a02e1d02955e888c043346c703b959c740467c0de768f8928f2882fc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ccb6bf72c6dd271fe95379b9074b7f9d21c19f63dd3f064ae25aa91500789cd9cb14481674bbce08b99d1681139820615265b4f8480eb76a8b2dea26500685aa
|
|
7
|
+
data.tar.gz: 47d5e239f7d65ec8bafd8d2d14dea7b2363f5b726f0fd9312f23473e15d167cffa27c2f49bddb6238e13bb12f2e48bf41e275590b8bfceca7d6527a3932b2b2e
|
|
@@ -228,7 +228,14 @@ module Jekyll
|
|
|
228
228
|
|
|
229
229
|
# Apply default classes to all other non-alert links
|
|
230
230
|
doc.css('a:not(.btn)').each do |link|
|
|
231
|
-
|
|
231
|
+
next if link.ancestors('p.alert').any?
|
|
232
|
+
|
|
233
|
+
classes_to_add = if link['class'].to_s.match?(/\blink-underline-(?!opacity)\S+/)
|
|
234
|
+
default_classes.split.grep_v(/\Alink-underline-(?!opacity)/).join(' ')
|
|
235
|
+
else
|
|
236
|
+
default_classes
|
|
237
|
+
end
|
|
238
|
+
add_classes(link, classes_to_add)
|
|
232
239
|
end
|
|
233
240
|
end
|
|
234
241
|
|
|
@@ -268,6 +275,7 @@ module Jekyll
|
|
|
268
275
|
|
|
269
276
|
icon = Nokogiri::XML::Node.new('i', doc)
|
|
270
277
|
icon['class'] = 'fa-solid fa-external-link ms-1'
|
|
278
|
+
icon['aria-hidden'] = 'true'
|
|
271
279
|
link.add_child(icon)
|
|
272
280
|
end
|
|
273
281
|
end
|