about summary refs log tree commit diff
path: root/app/lib/html_aware_formatter.rb
diff options
context:
space:
mode:
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