In Files

Parent

Methods

Files

RedcarpetCompat

Compatibility class; Creates an instance of Redcarpet with the RedCloth API.

Attributes

text[RW]

Public Class Methods

new(text, *exts) click to toggle source
# File lib/redcarpet.rb, line 61
def initialize(text, *exts)
  exts_hash, render_hash = *parse_extensions_and_renderer_options(exts)
  @text = text
  renderer = Redcarpet::Render::HTML.new(render_hash)
  @markdown = Redcarpet::Markdown.new(renderer, exts_hash)
end

Public Instance Methods

to_html(*_dummy) click to toggle source
# File lib/redcarpet.rb, line 68
def to_html(*_dummy)
  @markdown.render(@text)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.