Sha256: 9f19d15c7f482ec06ee7b2965fbf3695687013e55abb8b87044c00d09b956db5
Contents?: true
Size: 1.51 KB
Versions: 3
Compression:
Stored size: 1.51 KB
Contents
MD_FILES = /md|mkdn?|mdown|markdown/ if markup('github/markdown', MD_FILES) do |content| GitHub::Markdown.render(content) end elsif markup(:redcarpet, MD_FILES) do |content| RedcarpetCompat.new(content).to_html end elsif markup(:rdiscount, MD_FILES) do |content| RDiscount.new(content).to_html end elsif markup(:maruku, MD_FILES) do |content| Maruku.new(content).to_html end elsif markup(:kramdown, MD_FILES) do |content| Kramdown::Document.new(content).to_html end elsif markup(:bluecloth, MD_FILES) do |content| BlueCloth.new(content).to_html end end 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).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 command(:rest2html, /re?st(\.txt)?/) command('asciidoc -s --backend=xhtml11 -o - -', /asciidoc/) # 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
github-markup-0.7.4 | lib/github/markups.rb |
github-markup-0.7.3 | lib/github/markups.rb |
github-markup-0.7.2 | lib/github/markups.rb |