Class: Redcarpet::Render::Code

Inherits:
Base
  • Object
show all
Defined in:
lib/markdown2code.rb

Instance Method Summary collapse

Instance Method Details

#block_code(code, language) ⇒ Object



11
12
13
# File 'lib/markdown2code.rb', line 11

def block_code(code, language)
  "#{code}"
end

#header(text, level) ⇒ Object



19
20
21
22
23
# File 'lib/markdown2code.rb', line 19

def header(text, level)
  hashes = ''
  level.times {hashes += "#"}
  "# #{hashes} #{text} #{hashes}\n\n"
end

#linebreakObject



15
16
17
# File 'lib/markdown2code.rb', line 15

def linebreak
  "\n"
end

#paragraph(text) ⇒ Object



7
8
9
# File 'lib/markdown2code.rb', line 7

def paragraph(text)
  "# #{text}\n\n"
end