use Pod::Simple::HTML to live in this century
Ricardo Signes rjbs@cpan.org
Wed, 03 Feb 2010 05:03:19 +0800
1 files changed,
3 insertions(+),
6 deletions(-)
jump to
M
lib/github/markups.rb
→
lib/github/markups.rb
@@ -23,11 +23,8 @@ # 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 -->', '') +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