dev_forum
SylorHuang 6 years ago
parent 9c7523a852
commit 5db1bbd18a

@ -335,6 +335,7 @@ module ApplicationHelper
end end
def to_markdown(text) def to_markdown(text)
Rails.logger.info("#########################text______________tedxt_________________###{text}")
return nil if text.blank? return nil if text.blank?
options = { options = {
:autolink => true, :autolink => true,
@ -346,7 +347,10 @@ module ApplicationHelper
:tables => true :tables => true
} }
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML,options) markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML,options)
markdown.render(text) ss = markdown.render(text)
Rails.logger.info("#########################text______________markdown.render(text)________________###{ss}")
ss
end end
end end

Loading…
Cancel
Save