Integration of markdown with redcarpet gem
This commit is contained in:
parent
0c1ed4408f
commit
f6a9142510
3 changed files with 15 additions and 0 deletions
|
|
@ -197,4 +197,14 @@ module ApplicationHelper
|
|||
(short_title_brand(@conference) if @conference) ||
|
||||
default_brand
|
||||
end
|
||||
|
||||
def dat_markdown(text)
|
||||
options = {
|
||||
:autolink => true,
|
||||
:space_after_headers => true,
|
||||
:no_intra_emphasis => true
|
||||
}
|
||||
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, options)
|
||||
markdown.render(text).html_safe
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue