about summary refs log tree commit diff
path: root/app/lib/formatter.rb
diff options
context:
space:
mode:
authorEffy Elden <github@effy.is>2017-04-14 20:50:00 +1000
committerEugen <eugen@zeonfederated.com>2017-04-14 12:50:00 +0200
commit8321884eef44a124be76a5d7c68ed5b17e483b7d (patch)
treef11c47cca646c3159d673bcf2caf457b41af0695 /app/lib/formatter.rb
parent290e8ef8542e609c9244c5cfd115afe320c2f697 (diff)
Change usage of gsub to delete, as per Code Climate/Rubocop recommendation (#1753)
Diffstat (limited to 'app/lib/formatter.rb')
-rw-r--r--app/lib/formatter.rb2
1 files changed, 1 insertions, 1 deletions
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)