Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

License

NotificationsYou must be signed in to change notification settings

github/markup

Repository files navigation

This library is thefirst step of a journey that every markup file in a repository goes on before it is rendered on GitHub.com:

  1. github-markup selects anunderlying library to convert the raw markup to HTML. See the list ofsupported markup formats below.
  2. The HTML is sanitized, aggressively removing things that could harm you and your kin—such asscript tags, inline-styles, andclass orid attributes.
  3. Syntax highlighting is performed on code blocks. Seegithub/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 thatonly 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 ourcontributing guidelines before reporting an issue.

Markups

The following markups are supported. The dependencies listed are required ifyou wish to run the library. You can also runscript/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 .venvsource .venv/bin/activatecd script./bootstrap

Contributing

SeeContributing.

About

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

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors101


[8]ページ先頭

©2009-2025 Movatter.jp