Fix footnote and reversefootnote links from being treated as external links

This commit is contained in:
Maggie Delano 2021-03-14 00:05:17 -05:00
parent 6ab7bae8a1
commit 8e6ef533c6
2 changed files with 4 additions and 2 deletions

View File

@ -8,7 +8,7 @@ Jekyll::Hooks.register [:pages, :notes], :post_convert do |doc|
if open_external_links_in_new_tab if open_external_links_in_new_tab
parsed_doc = Nokogiri::HTML(doc.content) parsed_doc = Nokogiri::HTML(doc.content)
parsed_doc.css("a:not(.internal-link)").each do |link| parsed_doc.css("a:not(.internal-link):not(.footnote):not(.reversefootnote)").each do |link|
link.set_attribute('target', 'blank') link.set_attribute('target', 'blank')
end end
doc.content = parsed_doc.to_html doc.content = parsed_doc.to_html

View File

@ -92,7 +92,9 @@ a {
content: ""; content: "";
color: #aaaaaa; color: #aaaaaa;
} }
&.internal-link:after { &.internal-link:after,
&.footnote:after,
&.reversefootnote:after {
content: ""; content: "";
} }
} }