Apply review suggestion from @nilsding

Co-authored-by: Georg Gadinger <nilsding@nilsding.org>
This commit is contained in:
Andreas Nedbal 2022-01-02 19:26:04 +01:00 committed by Andreas Nedbal
parent 48c31ebdc6
commit fab007b2a2
1 changed files with 5 additions and 5 deletions

View File

@ -3,11 +3,11 @@ module SharedMarkers
def autolink(link, _link_type) def autolink(link, _link_type)
href = if ALLOWED_HOSTS_IN_MARKDOWN.include?(URI(link).host) href = if ALLOWED_HOSTS_IN_MARKDOWN.include?(URI(link).host)
link link
else else
linkfilter_path(url: link) linkfilter_path(url: link)
end end
content_tag(:a, link, href: href, target: "_blank", rel: "nofollow") content_tag(:a, link, href: href, target: "_blank", rel: "nofollow")
rescue rescue
link link