GitXplorerGitXplorer
g

markup

public
5882 stars
3401 forks
76 issues

Commits

List of commits on branch master.
Verified
a0d73c274752fd5855a7abcf46a6b176e224ba20

Merge pull request #1894 from github/jm_fix_stale_message

jjmeridth committed 2 months ago
Verified
8df533e1e778569fb8d626c35c68a5b12de70ace

Merge pull request #1896 from github/dependabot/bundler/dependencies-3d4b7d5b5f

jjmeridth committed 2 months ago
Verified
a662ce8c158d82df3c0e0ee3f4435c277e0c1568

Merge pull request #1895 from github/dependabot/github_actions/dependencies-929acdbdef

jjmeridth committed 2 months ago
Verified
5767386b134d0b70634a2187001beadafaf39a3c

chore(deps): bump the dependencies group across 1 directory with 6 updates

ddependabot[bot] committed 2 months ago
Verified
371da086ed849e8a3b255eed932b040ef7ca2042

chore(deps): bump the dependencies group across 1 directory with 4 updates

ddependabot[bot] committed 2 months ago
Verified
57e250f0fb775a154a0184702f310f954b3d5762

fix: stale issue/pr message

jjmeridth committed 2 months ago

README

The README file for this repository.

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 GitHub.com:

  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 script tags, inline-styles, and class or id attributes.
  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 GitHub.com.

Please note that only the first step is covered by this gem — the rest happens on GitHub.com. In particular, markup 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.

Markups

The following markups are supported. The dependencies listed are required if you wish to run the library. You can also run script/bootstrap to fetch them all.

Installation

gem install github-markup

or

bundle install

from this directory.

Usage

Basic form:

require 'github/markup'

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

More realistic form:

require 'github/markup'

GitHub::Markup.render(file, File.read(file))

And a convenience form:

require 'github/markup'

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

Local Development

python3 -m venv .venv
source .venv/bin/activate
cd script
./bootstrap

Contributing

See Contributing.