Merge pull request #119 from darylf/patch-1

Use _blank for the target
This commit is contained in:
Maxime Vaillancourt 2022-06-14 19:11:56 -04:00 committed by GitHub
commit 8518ad014b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,7 +21,7 @@ def convert_links(doc)
if open_external_links_in_new_tab
parsed_doc = Nokogiri::HTML(doc.content)
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
doc.content = parsed_doc.to_html
end