Determines which markup library to use to render a content file (e.g. README) on GitHub
Перейти к файлу
dependabot[bot] 6d287a98bb
chore(deps): bump rexml from 3.3.3 to 3.3.6 in the bundler group
Bumps the bundler group with 1 update: [rexml](https://github.com/ruby/rexml).


Updates `rexml` from 3.3.3 to 3.3.6
- [Release notes](https://github.com/ruby/rexml/releases)
- [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md)
- [Commits](https://github.com/ruby/rexml/compare/v3.3.3...v3.3.6)

---
updated-dependencies:
- dependency-name: rexml
  dependency-type: direct:production
  dependency-group: bundler
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-22 20:51:15 +00:00
.github fix: add explicit permissions to ci github action 2024-08-06 15:24:51 -05:00
bin github-markup: display basename instead of entire $0 2017-11-27 15:16:15 +11:00
lib update version and history 2024-06-17 11:20:56 -04:00
script Update bootstrap script to use pip3 2021-03-30 16:36:14 -05:00
test Update nokogiri, nokogiri-diff, rdoc 2024-06-14 17:04:52 -04:00
.dockerignore add testing Dockerfile 2018-12-10 12:50:58 +11:00
.gitignore chore: add dependabot and update github actions 2024-06-17 11:00:52 -05:00
.kick add .kick, i love it 2009-10-30 18:14:35 -07:00
CODE_OF_CONDUCT.md Add Code of Conduct 2018-08-27 16:53:04 -07:00
CONTRIBUTING.md Remove reference to deprecated support email 2022-12-29 11:30:34 -08:00
Dockerfile add testing Dockerfile 2018-12-10 12:50:58 +11:00
Gemfile fix: ensure rubygems url is using https 2024-08-06 15:05:30 -05:00
Gemfile.lock chore(deps): bump rexml from 3.3.3 to 3.3.6 in the bundler group 2024-08-22 20:51:15 +00:00
HISTORY.md update version and history 2024-06-17 11:20:56 -04:00
LICENSE license 2009-10-30 18:17:47 -07:00
README.md remove pod6 from supported list 2019-02-25 09:37:42 +11:00
Rakefile Restore "test" as the default rake task 2015-01-16 10:37:02 -05:00
github-markup.gemspec Update activesupport to 7.1.3.4 2024-06-17 11:19:13 -04:00

README.md

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")

Contributing

See Contributing.