about summary refs log tree commit diff
path: root/app/lib/html_aware_formatter.rb
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-03-28 20:51:51 +0200
committerClaire <claire.github-309c@sitedethib.com>2022-03-28 22:21:37 +0200
commit61cefbebf717326bd6ec3923e67e3702a24a0b24 (patch)
tree99b7b8816739be2701d8629b4cb6d7fb4423e135 /app/lib/html_aware_formatter.rb
parentf313bf3e97ddd83e7847ae00f5bdb488942c943c (diff)
Add advanced text formatting back into glitch-soc
Diffstat (limited to 'app/lib/html_aware_formatter.rb')
-rw-r--r--app/lib/html_aware_formatter.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/lib/html_aware_formatter.rb b/app/lib/html_aware_formatter.rb
index 64edba09b..7a1cd0340 100644
--- a/app/lib/html_aware_formatter.rb
+++ b/app/lib/html_aware_formatter.rb
@@ -33,6 +33,10 @@ class HtmlAwareFormatter
   end
 
   def linkify
-    TextFormatter.new(text, options).to_s
+    if %w(text/markdown text/html).include?(@options[:content_type])
+      AdvancedTextFormatter.new(text, options).to_s
+    else
+      TextFormatter.new(text, options).to_s
+    end
   end
 end