Apply review suggestion from @raccube

Co-authored-by: Karina Kwiatek <6197148+raccube@users.noreply.github.com>
This commit is contained in:
Andreas Nedbal 2022-01-02 19:23:59 +01:00 committed by Andreas Nedbal
parent 0a530bfd63
commit 48c31ebdc6
1 changed files with 9 additions and 11 deletions

View File

@ -2,7 +2,6 @@ module SharedMarkers
include ActionView::Helpers::TagHelper include ActionView::Helpers::TagHelper
def autolink(link, _link_type) def autolink(link, _link_type)
begin
href = if ALLOWED_HOSTS_IN_MARKDOWN.include?(URI(link).host) href = if ALLOWED_HOSTS_IN_MARKDOWN.include?(URI(link).host)
link link
else else
@ -13,5 +12,4 @@ module SharedMarkers
rescue rescue
link link
end end
end
end end