From: Effy Elden Date: Fri, 14 Apr 2017 10:50:00 +0000 (+1000) Subject: Change usage of gsub to delete, as per Code Climate/Rubocop recommendation (#1753) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=8321884eef44a124be76a5d7c68ed5b17e483b7d;p=mastodon.git Change usage of gsub to delete, as per Code Climate/Rubocop recommendation (#1753) --- diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb index 64b1f86d4..a44e5ed3e 100644 --- a/app/lib/formatter.rb +++ b/app/lib/formatter.rb @@ -15,7 +15,7 @@ class Formatter html = status.text html = encode(html) html = simple_format(html, {}, sanitize: false) - html = html.gsub(/\n/, '') + html = html.delete("\n") html = link_urls(html) html = link_mentions(html, status.mentions) html = link_hashtags(html)