Sha256: c4f3e550e5fe8a2910feffda184b2a771089bd54cff01df1157217a06d465a3d
Contents?: true
Size: 1.38 KB
Versions: 4
Compression:
Stored size: 1.38 KB
Contents
require "github/markup/markdown" require "shellwords" markups << GitHub::Markup::Markdown.new markup(:redcloth, /textile/) do |content| RedCloth.new(content).to_html end markup('github/markup/rdoc', /rdoc/) do |content| GitHub::Markup::RDoc.new(content).to_html end markup('org-ruby', /org/) do |content| Orgmode::Parser.new(content, { :allow_include_files => false, :skip_syntax_highlight => true }).to_html end markup(:creole, /creole/) do |content| Creole.creolize(content) end markup(:wikicloth, /mediawiki|wiki/) do |content| WikiCloth::WikiCloth.new(:data => content).to_html(:noedit => true) end markup(:asciidoctor, /adoc|asc(iidoc)?/) do |content| Asciidoctor.render(content, :safe => :secure, :attributes => %w(showtitle idprefix idseparator=- env=github env-github source-highlighter=html-pipeline)) end command("python2 -S #{Shellwords.escape(File.dirname(__FILE__))}/commands/rest2html", /re?st(\.txt)?/) # pod2html is nice enough to generate a full-on HTML document for us, # so we return the favor by ripping out the good parts. # # Any block passed to `command` will be handed the command's STDOUT for # post processing. command('/usr/bin/env perl -MPod::Simple::HTML -e Pod::Simple::HTML::go', /pod/) do |rendered| if rendered =~ /<!-- start doc -->\s*(.+)\s*<!-- end doc -->/mi $1 end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
github-markup-1.3.3 | lib/github/markups.rb |
github-markup-1.3.2 | lib/github/markups.rb |
github-markup-1.3.1 | lib/github/markups.rb |
github-markup-1.3.0 | lib/github/markups.rb |