feat: Enable Markdown Parsing in emails (#1663)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Sojan Jose
2021-01-18 11:43:31 +05:30
committed by GitHub
parent 54f15b73d3
commit 13073629bb
7 changed files with 36 additions and 15 deletions

View File

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