# class GitHub::Markup::Markdown

### Constants

MARKDOWN_GEMS

### Public Class Methods

new() click to toggle source
Calls superclass method `GitHub::Markup::Implementation::new`

    # File lib/github/markup/markdown.rb, line 113
    def initialize
      super(
        /md|mkdn?|mdwn|mdown|markdown|mdx|litcoffee/i,
        ["Markdown", "MDX", "Literate CoffeeScript"])
    end

### Public Instance Methods

load() click to toggle source

    # File lib/github/markup/markdown.rb, line 119
    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

name() click to toggle source

    # File lib/github/markup/markdown.rb, line 135
    def name
      "markdown"
    end

render(filename, content, options: {}) click to toggle source

    # File lib/github/markup/markdown.rb, line 130
    def render(filename, content, options: {})
      load
      @renderer.call(content, options: options)
    end