Merge pull request #273 from gopesht/implements_markdown
Implements markdown
This commit is contained in:
commit
fbf52b1d69
23 changed files with 3140 additions and 21 deletions
|
|
@ -197,4 +197,18 @@ module ApplicationHelper
|
|||
(short_title_brand(@conference) if @conference) ||
|
||||
default_brand
|
||||
end
|
||||
|
||||
def 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
|
||||
|
||||
def markdown_hint(text="")
|
||||
markdown("#{text} Please look at #{link_to '**Markdown Syntax**', 'https://daringfireball.net/projects/markdown/syntax', target: '_blank'} to format your text")
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue