github-markup picks the correct renderer for repository markup files such as READMEs before GitHub.com sanitizes and displays them. The gem covers only the first conversion step to HTML.
Overview
GitHub Markup is a Ruby gem that routes a markup file to the appropriate underlying library for formats like Markdown, RDoc, Textile, and other documented types. It represents the first stage in GitHub’s pipeline before site-side sanitization and feature filters run.
The library itself does not sanitize HTML; consumers must apply their own safety pipeline if they render output outside GitHub.com. Supported formats list required external dependencies, and script/bootstrap can fetch them for local development.
Markdown rendering delegates to CommonMarker 0.x or 2.x depending on the installed version, preserving parser-specific options. APIs include basic render calls plus convenience helpers for typical paths.
Teams embedding the gem choose parsers explicitly while sharing the same selection rules GitHub uses for README rendering.
Key features
- Routes files to format-specific renderers
- Supports Markdown via CommonMarker
- Handles multiple legacy markup formats
- Bootstrap script to install dependencies
- Documented API for standalone rendering
- Covers only HTML conversion, not sanitization
Use cases
- Render README files with GitHub-compatible parsers
- Prototype markup handling in Ruby tooling
- Match GitHub format detection in local previews