Parent

Methods

GitHub::Markup::Markdown

Constants

MARKDOWN_GEMS

Public Class Methods

new() click to toggle source
# File lib/github/markup/markdown.rb, line 27
def initialize
  super(/md|mkdn?|mdwn|mdown|markdown|litcoffee/)
end

Public Instance Methods

load() click to toggle source
# File lib/github/markup/markdown.rb, line 31
def load
  return if @renderer
  MARKDOWN_GEMS.each do |gem_name, renderer|
    if try_require(gem_name)
      @renderer = renderer
      return
    end
  end
  raise LoadError, "no suitable markdown gem found"
end
render(content) click to toggle source
# File lib/github/markup/markdown.rb, line 42
def render(content)
  load
  @renderer.call(content)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.