Updated markdown parsing in backend
• Updated: - markdown parsing in backend
This commit is contained in:
parent
fc80955306
commit
788150536d
@ -28,6 +28,10 @@ class HTMLRenderer < Redcarpet::Render::HTML
|
||||
"<h1>#{text}</h1>"
|
||||
end
|
||||
|
||||
def paragraph(text)
|
||||
"<p>#{text}</p>"
|
||||
end
|
||||
|
||||
def triple_emphasis(text)
|
||||
"<b><em>#{text}</em></b>"
|
||||
end
|
||||
@ -123,8 +127,9 @@ class Formatter
|
||||
|
||||
def format_markdown(html)
|
||||
html = markdown_formatter.render(html)
|
||||
# html.delete("\r").delete("\n")
|
||||
html = html.gsub(/(?:\n\r?|\r\n?)/, '<br />')
|
||||
html = html.gsub(/\n/, '<br />')
|
||||
html.delete("\r").delete("\n")
|
||||
html
|
||||
end
|
||||
|
||||
def reformat(html, outgoing = false)
|
||||
|
Loading…
Reference in New Issue
Block a user