Skip to content
Snippets Groups Projects
Commit 47d1cb4e authored by Eugen Rochko's avatar Eugen Rochko
Browse files

TIL a return from a block seems to return from the whole method rather than

the block, even though the last line of a block is an implicit return. I am
confused to say the least
parent 071f64d3
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@ module ApplicationHelper
auto_link(coder.encode(status.text), link: :urls, html: { rel: 'nofollow noopener' }).gsub(Account::MENTION_RE) do |m|
account = mention_hash[Account::MENTION_RE.match(m)[1]]
return "#{m.split('@').first}<a href=\"#{url_for_target(account)}\" class=\"mention\">@<span>#{account.acct}</span></a>"
"#{m.split('@').first}<a href=\"#{url_for_target(account)}\" class=\"mention\">@<span>#{account.acct}</span></a>"
end.html_safe
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment