diff options
author | Reverite <github@reverite.sh> | 2019-06-22 14:15:02 -0600 |
---|---|---|
committer | Reverite <github@reverite.sh> | 2019-06-22 14:15:02 -0600 |
commit | 714940de498e93a8bf40dcda1835217df18741bf (patch) | |
tree | eafc1d01710ba978f133216d8d1a6e4d585606c6 /app/lib/formatter.rb | |
parent | b2ffaa9f2909c83f23691a02b2843bf41a1a12c0 (diff) | |
parent | 38d28824475056766c97385b66f4e04a5123e3a2 (diff) |
Merge branch 'glitch' into production
Diffstat (limited to 'app/lib/formatter.rb')
-rw-r--r-- | app/lib/formatter.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb index 8a2828bbf..4c11ca291 100644 --- a/app/lib/formatter.rb +++ b/app/lib/formatter.rb @@ -59,11 +59,10 @@ class Formatter html = "RT @#{prepend_reblog} #{html}" if prepend_reblog html = format_markdown(html) if status.content_type == 'text/markdown' html = encode_and_link_urls(html, linkable_accounts, keep_html: %w(text/markdown text/html).include?(status.content_type)) + html = reformat(html) if %w(text/markdown text/html).include?(status.content_type) html = encode_custom_emojis(html, status.emojis, options[:autoplay]) if options[:custom_emojify] - if %w(text/markdown text/html).include?(status.content_type) - html = reformat(html) - else + unless %w(text/markdown text/html).include?(status.content_type) html = simple_format(html, {}, sanitize: false) html = html.delete("\n") end |