8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# File 'lib/mint/markdown_template.rb', line 8
def prepare
@options = options.dup
renderer_options = {
filter_html: false,
no_images: false,
no_links: false,
no_styles: false,
escape_html: false,
safe_links_only: false,
with_toc_data: false,
hard_wrap: false,
prettify: false
}.merge(@options)
markdown_options = {
tables: true,
autolink: true,
no_intra_emphasis: true,
fenced_code_blocks: true,
lax_html_blocks: false,
strikethrough: true,
superscript: false,
footnotes: false,
highlight: false,
quote: false,
disable_indented_code_blocks: false,
space_after_headers: false,
underline: false
}
@renderer = @options.delete(:renderer) || Redcarpet::Render::HTML.new(renderer_options)
@markdown = Redcarpet::Markdown.new(@renderer, markdown_options)
end
|