Added hints to description fields to use markdown syntax, rendered all description fields in the splash as markdown
This commit is contained in:
parent
f6a9142510
commit
8efcd69f3d
15 changed files with 30 additions and 24 deletions
|
|
@ -198,13 +198,17 @@ module ApplicationHelper
|
|||
default_brand
|
||||
end
|
||||
|
||||
def dat_markdown(text)
|
||||
def markdown(text)
|
||||
options = {
|
||||
:autolink => true,
|
||||
:space_after_headers => true,
|
||||
:no_intra_emphasis => true
|
||||
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