Apply review suggestion from @nilsding
Co-authored-by: Georg Gadinger <nilsding@nilsding.org>
This commit is contained in:
parent
48c31ebdc6
commit
fab007b2a2
|
@ -3,11 +3,11 @@ module SharedMarkers
|
|||
|
||||
def autolink(link, _link_type)
|
||||
href = if ALLOWED_HOSTS_IN_MARKDOWN.include?(URI(link).host)
|
||||
link
|
||||
else
|
||||
linkfilter_path(url: link)
|
||||
end
|
||||
|
||||
link
|
||||
else
|
||||
linkfilter_path(url: link)
|
||||
end
|
||||
|
||||
content_tag(:a, link, href: href, target: "_blank", rel: "nofollow")
|
||||
rescue
|
||||
link
|
||||
|
|
Loading…
Reference in New Issue