Module: Docify::Markup

Extended by:
Markup
Included in:
Docify, Document, Markup
Defined in:
lib/docify/markup.rb

Instance Method Summary collapse

Instance Method Details

#markdown(content) ⇒ Object

Render content for Markdown



16
17
18
# File 'lib/docify/markup.rb', line 16

def markdown(content)
  Markdown.new(content).to_html
end

#rdoc(content) ⇒ Object

Render content for RDoc



10
11
12
13
# File 'lib/docify/markup.rb', line 10

def rdoc(content)
  markup = RDoc::Markup::ToHtml.new
  markup.convert(content)
end

#textile(content) ⇒ Object

Render content for Textile



21
22
23
# File 'lib/docify/markup.rb', line 21

def textile(content)
  RedCloth.new(content).to_html
end