Class: K4compiler::MarkdownRenderer

Inherits:
Redcarpet::Render::HTML
  • Object
show all
Defined in:
lib/k4compiler/compiler/markdown.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.optionsHash

Returns:

  • (Hash)


8
9
10
11
12
13
14
# File 'lib/k4compiler/compiler/markdown.rb', line 8

def self.options
  return {
    markdown_options: nil,
    renderer: nil,
    render_options: nil,
  }
end

Instance Method Details

#block_code(code, lang = nil) ⇒ Object



17
18
19
20
21
# File 'lib/k4compiler/compiler/markdown.rb', line 17

def block_code(code, lang=nil)
  lang ||= 'text'
  code = "\n<pre class=\"prettyprint lang-#{lang}\">\n#{code}</pre>\n"
  return code
end