Sha256: 9c9d370e3492d1d2e6c040dafbbcc94041be4207afa51da44af262227f556eda

Contents?: true

Size: 1.06 KB

Versions: 28

Compression:

Stored size: 1.06 KB

Contents

# GitHub Markdown Rendering class
#
# Provides a Markdown rendering method as a singleton, and two
# auxiliary functions
#
# There are two kinds of Markdown in GitHub.com:
#
# - Plain Markdown: used in Wikis, Pages and GitHub::Markup (READMEs).
#   This is standards-compliant Markdown, with some of the PHP-Markdown
#   extensions:
#
# - GitHub-flavored Markdown: used in user-input text, such as comments.
#   Same extensions as Plain Markdown, and additionally the following
#   extensions:
#
# GitHub::Markdown.render(content)
# #=> Rendered Markdown as HTML plaintext with the default extensions
#
# GitHub::Markdown.render_gfm(content)
# #=> Rendered GitHub-flavored Markdown as HTML plaintext
#
# GitHub::Markdown._to_html(content, mode) { |code, lang| ... }
# #=> Rendered Markdown with the given mode as HTML plaintext
module GitHub
  class Markdown
    def self.render(content)
      self.to_html(content, :markdown)
    end

    def self.render_gfm(content)
      self.to_html(content, :gfm)
    end
  end
end

# Load the actual C extension
require 'github/markdown.so'

Version data entries

28 entries across 27 versions & 2 rubygems

Version Path
tdiary-5.0.5 vendor/bundle/gems/github-markdown-0.6.9/lib/github/markdown.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/github-markdown-0.6.9/lib/github/markdown.rb
tdiary-5.0.4 vendor/bundle/gems/github-markdown-0.6.9/lib/github/markdown.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/github-markdown-0.6.9/lib/github/markdown.rb
github-markdown-0.6.9 lib/github/markdown.rb
github-markdown-0.6.8 lib/github/markdown.rb
github-markdown-0.6.7 lib/github/markdown.rb
github-markdown-0.6.6 lib/github/markdown.rb
github-markdown-0.6.5 lib/github/markdown.rb
github-markdown-0.6.4 lib/github/markdown.rb
github-markdown-0.6.3 lib/github/markdown.rb
github-markdown-0.6.2 lib/github/markdown.rb
github-markdown-0.6.1 lib/github/markdown.rb
github-markdown-0.6.0 lib/github/markdown.rb
github-markdown-0.5.5 lib/github/markdown.rb
github-markdown-0.5.4 lib/github/markdown.rb
github-markdown-0.5.3 lib/github/markdown.rb
github-markdown-0.5.2 lib/github/markdown.rb
github-markdown-0.5.1 lib/github/markdown.rb
github-markdown-0.5.0 lib/github/markdown.rb