MyGit

github/markup

Fork: 3394 Star: 5870 (更新于 2024-11-19 18:10:09)

license: MIT

Language: Ruby .

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

GitHub网址

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.

最近版本更新:(数据更新于 1970-01-01 00:00:00)

主题(topics):

readme

github/markup同语言 Ruby最近更新仓库

2024-11-11 23:51:28 docusealco/docuseal

2024-10-25 21:50:52 maybe-finance/maybe

2024-10-15 12:03:41 capistrano/sshkit

2024-10-07 22:52:44 sous-chefs/postgresql

2024-10-06 00:01:30 rails/solid_queue

2024-09-26 23:26:21 dependabot/dependabot-core