From: Eugen Rochko Date: Sat, 10 Sep 2016 17:18:17 +0000 (+0200) Subject: Fix formatter return block X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=3d566279cb84aba6d07eaadebda6c059f2a58657;p=mastodon.git Fix formatter return block --- diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb index 12b141e7e..ad0f022a7 100644 --- a/app/lib/formatter.rb +++ b/app/lib/formatter.rb @@ -37,8 +37,7 @@ class Formatter acct = Account::MENTION_RE.match(match)[1] mention = mentions.find { |mention| mention.account.acct.eql?(acct) } - return match if mention.nil? - mention_html(match, mention.account) + mention.nil? ? match : mention_html(match, mention.account) end end