fix: Use commonmarker instead of redcarpet (#1732)

This commit is contained in:
Pranav Raj S
2021-02-05 11:24:18 +05:30
committed by GitHub
parent 2012aab1d5
commit 351403457e
5 changed files with 9 additions and 10 deletions

View File

@@ -1,4 +1,3 @@
<% markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, autolink: true, tables: true) %>
<% @messages.each do |message| %>
<tr>
<td>
@@ -8,7 +7,7 @@
<tr>
<td style="padding-bottom: 16px;">
<% 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| %>

View File

@@ -1,4 +1,3 @@
<% markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, autolink: true, tables: true) %>
<p>Hi <%= @contact.name %>,</p>
<p>You have new messages on your conversation.</p>
@@ -12,7 +11,7 @@
<tr>
<td style="padding: 10px 20px; margin: 5px 0 20px 0; background: #F2F3F7; border-radius: 10px; display: inline-block; font-family: "Helvetica Neue",Tahoma,Arial,sans-serif; text-align: start; unicode-bidi: plaintext;">
<% 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| %>

View File

@@ -1,9 +1,7 @@
<% markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, autolink: true, tables: true) %>
<% @messages.each do |message| %>
<p style="font-family: Roboto,"Helvetica Neue",Tahoma,Arial,sans-serif; text-align: start; unicode-bidi: plaintext;">
<% 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| %>