Need help with markup?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

5.3K Stars 3.6K Forks MIT License 666 Commits 187 Opened issues


Determines which markup library to use to render a content file (e.g. README) on GitHub

Services available


Need anything else?

Contributors list

GitHub Markup

This library is the first step of a journey that every markup file in a repository goes on before it is rendered on

  1. github-markup
    selects an underlying library to convert the raw markup to HTML. See the list of supported markup formats below.
  2. The HTML is sanitized, aggressively removing things that could harm you and your kin—such as
    tags, inline-styles, and
  3. Syntax highlighting is performed on code blocks. See github/linguist for more information about syntax highlighting.
  4. The HTML is passed through other filters that add special sauce, such as emoji, task lists, named anchors, CDN caching for images, and autolinking.
  5. The resulting HTML is rendered on

Please note that only the first step is covered by this gem — the rest happens on In particular,

itself does no sanitization of the resulting HTML, as it expects that to be covered by whatever pipeline is consuming the HTML.

Please see our contributing guidelines before reporting an issue.


The following markups are supported. The dependencies listed are required if you wish to run the library. You can also run

to fetch them all.
  • .markdown, .mdown, .mkdn, .md --
    gem install commonmarker
  • .textile --
    gem install RedCloth
  • .rdoc --
    gem install rdoc -v 3.6.1
  • .org --
    gem install org-ruby
  • .creole --
    gem install creole
  • .mediawiki, .wiki --
    gem install wikicloth
  • .rst --
    pip install docutils
  • .asciidoc, .adoc, .asc --
    gem install asciidoctor
  • .pod --
    comes with Perl >= 5.10. Lower versions should install Pod::Simple from CPAN.


gem install github-markup


bundle install

from this directory.


Basic form:

require 'github/markup'

GitHub::Markup.render('README.markdown', "* One\n* Two")

More realistic form:

require 'github/markup'


And a convenience form:

require 'github/markup'

GitHub::Markup.render_s(GitHub::Markups::MARKUP_MARKDOWN, "* One\n* Two")


See Contributing.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.