-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert #537 temporarily for final 1.4 release
- Loading branch information
Yuki Izumi
committed
Mar 27, 2017
1 parent
ec0eb75
commit bbee330
Showing
9 changed files
with
51 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,42 @@ | ||
require "github/markup/markdown" | ||
require "github/markup/rdoc" | ||
require "shellwords" | ||
require "linguist" | ||
|
||
markup_impl(::GitHub::Markups::MARKUP_MARKDOWN, ::GitHub::Markup::Markdown.new) | ||
|
||
markup(::GitHub::Markups::MARKUP_TEXTILE, :redcloth, [Linguist::Language["Textile"]]) do |content| | ||
markup(::GitHub::Markups::MARKUP_TEXTILE, :redcloth, /textile/) do |content| | ||
RedCloth.new(content).to_html | ||
end | ||
|
||
markup_impl(::GitHub::Markups::MARKUP_RDOC, GitHub::Markup::RDoc.new) | ||
|
||
markup(::GitHub::Markups::MARKUP_ORG, 'org-ruby', [Linguist::Language["Org"]]) do |content| | ||
markup(::GitHub::Markups::MARKUP_ORG, 'org-ruby', /org/) do |content| | ||
Orgmode::Parser.new(content, { | ||
:allow_include_files => false, | ||
:skip_syntax_highlight => true | ||
}).to_html | ||
end | ||
|
||
markup(::GitHub::Markups::MARKUP_CREOLE, :creole, [Linguist::Language["Creole"]]) do |content| | ||
markup(::GitHub::Markups::MARKUP_CREOLE, :creole, /creole/) do |content| | ||
Creole.creolize(content) | ||
end | ||
|
||
markup(::GitHub::Markups::MARKUP_MEDIAWIKI, :wikicloth, [Linguist::Language["MediaWiki"]]) do |content| | ||
markup(::GitHub::Markups::MARKUP_MEDIAWIKI, :wikicloth, /mediawiki|wiki/) do |content| | ||
wikicloth = WikiCloth::WikiCloth.new(:data => content) | ||
WikiCloth::WikiBuffer::HTMLElement::ESCAPED_TAGS << 'tt' unless WikiCloth::WikiBuffer::HTMLElement::ESCAPED_TAGS.include?('tt') | ||
wikicloth.to_html(:noedit => true) | ||
end | ||
|
||
markup(::GitHub::Markups::MARKUP_ASCIIDOC, :asciidoctor, [Linguist::Language["AsciiDoc"]]) do |content| | ||
markup(::GitHub::Markups::MARKUP_ASCIIDOC, :asciidoctor, /adoc|asc(iidoc)?/) do |content| | ||
Asciidoctor::Compliance.unique_id_start_index = 1 | ||
Asciidoctor.convert(content, :safe => :secure, :attributes => %w(showtitle=@ idprefix idseparator=- env=github env-github source-highlighter=html-pipeline)) | ||
end | ||
|
||
command( | ||
::GitHub::Markups::MARKUP_RST, | ||
"python2 -S #{Shellwords.escape(File.dirname(__FILE__))}/commands/rest2html", | ||
[Linguist::Language["reStructuredText"]], | ||
/re?st(\.txt)?/, | ||
"restructuredtext" | ||
) | ||
|
||
command(::GitHub::Markups::MARKUP_POD, :pod2html, [Linguist::Language["Pod"]], "pod") | ||
command(::GitHub::Markups::MARKUP_POD, :pod2html, /pod/, "pod") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters