|
2 | 2 | require "github/markup/rdoc" |
3 | 3 | require "shellwords" |
4 | 4 |
|
5 | | -markup_impl(::GitHub::Markups::MARKUP_MARKDOWN, ::GitHub::Markup::Markdown.new) |
| 5 | +GitHub::Markup.markup_impl(::GitHub::Markups::MARKUP_MARKDOWN, ::GitHub::Markup::Markdown.new) |
6 | 6 |
|
7 | | -markup(::GitHub::Markups::MARKUP_TEXTILE, :redcloth, /textile/, ["Textile"]) do |filename, content, options: {}| |
| 7 | +GitHub::Markup.markup(::GitHub::Markups::MARKUP_TEXTILE, :redcloth, /textile/, ["Textile"]) do |filename, content, options: {}| |
8 | 8 | RedCloth.new(content).to_html |
9 | 9 | end |
10 | 10 |
|
11 | | -markup_impl(::GitHub::Markups::MARKUP_RDOC, GitHub::Markup::RDoc.new) |
| 11 | +GitHub::Markup.markup_impl(::GitHub::Markups::MARKUP_RDOC, GitHub::Markup::RDoc.new) |
12 | 12 |
|
13 | | -markup(::GitHub::Markups::MARKUP_ORG, 'org-ruby', /org/, ["Org"]) do |filename, content, options: {}| |
| 13 | +GitHub::Markup.markup(::GitHub::Markups::MARKUP_ORG, 'org-ruby', /org/, ["Org"]) do |filename, content, options: {}| |
14 | 14 | Orgmode::Parser.new(content, { |
15 | 15 | :allow_include_files => false, |
16 | 16 | :skip_syntax_highlight => true |
17 | 17 | }).to_html |
18 | 18 | end |
19 | 19 |
|
20 | | -markup(::GitHub::Markups::MARKUP_CREOLE, :creole, /creole/, ["Creole"]) do |filename, content, options: {}| |
| 20 | +GitHub::Markup.markup(::GitHub::Markups::MARKUP_CREOLE, :creole, /creole/, ["Creole"]) do |filename, content, options: {}| |
21 | 21 | Creole.creolize(content) |
22 | 22 | end |
23 | 23 |
|
24 | | -markup(::GitHub::Markups::MARKUP_MEDIAWIKI, :wikicloth, /mediawiki|wiki/, ["MediaWiki"]) do |filename, content, options: {}| |
| 24 | +GitHub::Markup.markup(::GitHub::Markups::MARKUP_MEDIAWIKI, :wikicloth, /mediawiki|wiki/, ["MediaWiki"]) do |filename, content, options: {}| |
25 | 25 | wikicloth = WikiCloth::WikiCloth.new(:data => content) |
26 | 26 | WikiCloth::WikiBuffer::HTMLElement::ESCAPED_TAGS << 'tt' unless WikiCloth::WikiBuffer::HTMLElement::ESCAPED_TAGS.include?('tt') |
27 | 27 | wikicloth.to_html(:noedit => true) |
28 | 28 | end |
29 | 29 |
|
30 | | -markup(::GitHub::Markups::MARKUP_ASCIIDOC, :asciidoctor, /adoc|asc(iidoc)?/, ["AsciiDoc"]) do |filename, content, options: {}| |
| 30 | +GitHub::Markup.markup(::GitHub::Markups::MARKUP_ASCIIDOC, :asciidoctor, /adoc|asc(iidoc)?/, ["AsciiDoc"]) do |filename, content, options: {}| |
31 | 31 | attributes = { |
32 | 32 | 'showtitle' => '@', |
33 | 33 | 'idprefix' => '', |
|
47 | 47 | Asciidoctor.convert(content, :safe => :secure, :attributes => attributes) |
48 | 48 | end |
49 | 49 |
|
50 | | -command( |
| 50 | +GitHub::Markup.command( |
51 | 51 | ::GitHub::Markups::MARKUP_RST, |
52 | 52 | "python3 #{Shellwords.escape(File.dirname(__FILE__))}/commands/rest2html", |
53 | 53 | /re?st(\.txt)?/, |
54 | 54 | ["reStructuredText"], |
55 | 55 | "restructuredtext" |
56 | 56 | ) |
57 | 57 |
|
58 | | -command(::GitHub::Markups::MARKUP_POD6, :pod62html, /pod6/, ["Pod 6"], "pod6") |
59 | | -command(::GitHub::Markups::MARKUP_POD, :pod2html, /pod/, ["Pod"], "pod") |
| 58 | +GitHub::Markup.command(::GitHub::Markups::MARKUP_POD6, :pod62html, /pod6/, ["Pod 6"], "pod6") |
| 59 | +GitHub::Markup.command(::GitHub::Markups::MARKUP_POD, :pod2html, /pod/, ["Pod"], "pod") |
0 commit comments