Sha256: e38a3a98f1f0f80795d0f9b9b85b7c29ac84ba2aa9b72909a61ec4ba28678e18
Contents?: true
Size: 1 KB
Versions: 2
Compression:
Stored size: 1 KB
Contents
markup(:markdown, /md|mkdn?|mdown|markdown/) do |content| Markdown.new(content).to_html 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 command(:rest2html, /rest|rst/) 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 pod2html", /pod/) do |rendered| require 'fileutils' if rendered =~ /<body.+?>\s*(.+)\s*<\/body>/mi FileUtils.rm("pod2htmd.tmp") if File.exists?('pod2htmd.tmp') rescue nil FileUtils.rm("pod2htmi.tmp") if File.exists?('pod2htmi.tmp') rescue nil $1.sub('<!-- INDEX BEGIN -->', '').sub('<!-- INDEX END -->', '') end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
github-markup-0.2.1 | lib/github/markups.rb |
github-markup-0.2.0 | lib/github/markups.rb |