diff --git a/app/models/issue_comment.rb b/app/models/issue_comment.rb index 07647d679..8d150a02f 100644 --- a/app/models/issue_comment.rb +++ b/app/models/issue_comment.rb @@ -25,4 +25,8 @@ class IssueComment < ApplicationRecord belongs_to :user validates :body, :presence => true, :characters => true + + def body + RichText.new("markdown", self[:body]) + end end diff --git a/app/views/issues/_comments.html.erb b/app/views/issues/_comments.html.erb index e55bf4257..390977b65 100644 --- a/app/views/issues/_comments.html.erb +++ b/app/views/issues/_comments.html.erb @@ -9,7 +9,7 @@ <%= t ".comment_from_html", :user_link => link_to(comment.user.display_name, user_path(comment.user)), :comment_created_at => l(comment.created_at.to_datetime, :format => :friendly) %>
-<%= comment.body %>
+<%= comment.body.to_html %>