6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/markdowner/handlers/markdown_handler.rb', line 6
def call(template, source)
markdown = ::Redcarpet::Markdown.new(
Redcarpet::Render::HTML,
autolink: true,
tables: true,
fenced_code_blocks: true,
underline: true,
highlight: true,
quote: true,
footnotes: true,
no_styles: true,
hard_wrap: true,
prettify: true,
safe_links_only: true,
no_intra_emphasis: true,
strikethrough: true,
superscript: true,
lax_spacing: true,
space_after_headers: true
)
"#{markdown.render(source).inspect}.html_safe"
end
|