Module: Card::Set::Type::Markdown::HtmlFormat

Extended by:
AbstractFormat
Defined in:
platypus/tmp/set/gem-defaults/mod006-markdown/type/markdown.rb

Instance Method Summary collapse

Instance Method Details

#ace_modeObject



31
32
33
# File 'platypus/tmp/set/gem-defaults/mod006-markdown/type/markdown.rb', line 31

def ace_mode
  :markdown
end

#escape_literal(literal) ⇒ Object



23
24
25
# File 'platypus/tmp/set/gem-defaults/mod006-markdown/type/markdown.rb', line 23

def escape_literal literal
  literal
end

#input_typeObject



27
28
29
# File 'platypus/tmp/set/gem-defaults/mod006-markdown/type/markdown.rb', line 27

def input_type
  :ace_editor
end

#view: coreObject



12
13
14
15
16
17
18
19
20
21
# File 'platypus/tmp/set/gem-defaults/mod006-markdown/type/markdown.rb', line 12

view :core do
  safe_process_content do |content|
    Kramdown::Document.new(content,
                           syntax_highlighter: :coderay,
                           syntax_highlighter_opts: {
                             line_numbers: false,
                             default_lang: :ruby
                           }).to_html
  end
end