diff --git a/Gemfile b/Gemfile index 611c2b933..d1c6c6534 100644 --- a/Gemfile +++ b/Gemfile @@ -30,7 +30,7 @@ gem 'haikunator' # Template parsing safely gem 'liquid' # Parse Markdown to HTML -gem 'redcarpet' +gem 'commonmarker' ##-- for active storage --## gem 'aws-sdk-s3', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 7875e6c2a..b9f05e374 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -147,6 +147,8 @@ GEM coderay (1.1.3) coercible (1.0.0) descendants_tracker (~> 0.0.1) + commonmarker (0.21.1) + ruby-enum (~> 0.5) concurrent-ruby (1.1.7) connection_pool (2.2.3) crack (0.4.3) @@ -386,7 +388,6 @@ GEM rb-fsevent (0.10.4) rb-inotify (0.10.1) ffi (~> 1.0) - redcarpet (3.5.1) redis (4.2.1) redis-namespace (1.8.0) redis (>= 3.0.4) @@ -446,6 +447,8 @@ GEM rubocop (>= 0.87.0) rubocop-rspec (1.43.2) rubocop (~> 0.87) + ruby-enum (0.9.0) + i18n ruby-progressbar (1.10.1) ruby2ruby (2.4.4) ruby_parser (~> 3.1) @@ -598,6 +601,7 @@ DEPENDENCIES bullet bundle-audit byebug + commonmarker cypress-on-rails (~> 1.0) database_cleaner devise @@ -632,7 +636,6 @@ DEPENDENCIES pundit rack-cors rails - redcarpet redis redis-namespace redis-rack-cache diff --git a/app/views/mailers/conversation_reply_mailer/conversation_transcript.html.erb b/app/views/mailers/conversation_reply_mailer/conversation_transcript.html.erb index d8a3e0e9b..a372a1c43 100644 --- a/app/views/mailers/conversation_reply_mailer/conversation_transcript.html.erb +++ b/app/views/mailers/conversation_reply_mailer/conversation_transcript.html.erb @@ -1,4 +1,3 @@ -<% markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, autolink: true, tables: true) %> <% @messages.each do |message| %> @@ -8,7 +7,7 @@ <% if message.content %> - <%= markdown.render(message.content).html_safe %> + <%= CommonMarker.render_html(message.content).html_safe %> <% end %> <% if message.attachments %> <% message.attachments.each do |attachment| %> diff --git a/app/views/mailers/conversation_reply_mailer/reply_with_summary.html.erb b/app/views/mailers/conversation_reply_mailer/reply_with_summary.html.erb index d0b38a021..b160675a3 100644 --- a/app/views/mailers/conversation_reply_mailer/reply_with_summary.html.erb +++ b/app/views/mailers/conversation_reply_mailer/reply_with_summary.html.erb @@ -1,4 +1,3 @@ -<% markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, autolink: true, tables: true) %>

Hi <%= @contact.name %>,

You have new messages on your conversation.

@@ -12,7 +11,7 @@ <% if message.content %> - <%= markdown.render(message.content).html_safe %> + <%= CommonMarker.render_html(message.content).html_safe %> <% end %> <% if message.attachments %> <% message.attachments.each do |attachment| %> diff --git a/app/views/mailers/conversation_reply_mailer/reply_without_summary.html.erb b/app/views/mailers/conversation_reply_mailer/reply_without_summary.html.erb index ed084b2ca..42c7ed6ab 100644 --- a/app/views/mailers/conversation_reply_mailer/reply_without_summary.html.erb +++ b/app/views/mailers/conversation_reply_mailer/reply_without_summary.html.erb @@ -1,9 +1,7 @@ -<% markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, autolink: true, tables: true) %> - <% @messages.each do |message| %>

<% if message.content %> - <%= markdown.render(message.content).html_safe %> + <%= CommonMarker.render_html(message.content).html_safe %> <% end %> <% if message.attachments %> <% message.attachments.each do |attachment| %>