Fix footnote and reversefootnote links from being treated as external links
This commit is contained in:
parent
6ab7bae8a1
commit
8e6ef533c6
@ -8,7 +8,7 @@ Jekyll::Hooks.register [:pages, :notes], :post_convert do |doc|
|
||||
|
||||
if open_external_links_in_new_tab
|
||||
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')
|
||||
end
|
||||
doc.content = parsed_doc.to_html
|
||||
|
@ -92,7 +92,9 @@ a {
|
||||
content: "↗";
|
||||
color: #aaaaaa;
|
||||
}
|
||||
&.internal-link:after {
|
||||
&.internal-link:after,
|
||||
&.footnote:after,
|
||||
&.reversefootnote:after {
|
||||
content: "";
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user