Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Switch to Pod::Simple::XHTML #19

Closed
wants to merge 1 commit into from

4 participants

@theory

I strongly recommend Pod::Simple::XHTML over Pod::Simple::HTML. The HTML it generates is much cleaner, and you don't have to strip out the header and footer like you did with the hack that was there before. The one downside is that Pod::Simple 3.11 is required for it to be valid XHML (a bunch of bugs were fixed in that version). But overall it's just much cleaner to use.

@theory theory Switch to Pod::Simple::XHTML.
There are a few reasons for this:

* It's HTML output is *much* cleaner.
* You can tell it not to emit headers and footers directly.

The only downside is that you need a fairly recent version of Pod::Simple for
it to be there and really solid. I recommend 3.12 or higher, and at least
3.11.
5709959
@theory

BUMP. Any chance of getting this pulled in? I maintain Pod::Simple, and am here to tell you that Pod::Simple::XHTML is so much better than Pod::Simple::HTML…

Thanks,

David

@theory

Nagging again…

@dolmen

+1
Currently POD files are not rendered in the same way that Markdown files: titles are in bigger fonts, and different color. This makes the Github site inconsistent as the current POD rendering doesn't respects the Github CSS.

Cc: @mdo

@gjtorikian
Owner

Indeed, I agree this looks bad.

@theory Would you mind merging master so that this branch is up-to-date? Thank you and sorry.

@theory

Hrm. I seem to have deleted my fork. I've forked it again and updated it, but it will go into a new pull request. That okay, @gjtorikian?

@theory

Or you can just add the new fork as a new remote, and merge ccc6a7b.

@gjtorikian
Owner

That'll do.

@dolmen

@gjtorikian Any updates?

@bkeepers
Owner

Feel free to submit another PR with the updates.

@bkeepers bkeepers closed this
@theory

Huh? This is the PR. There are no changes.

@theory

Oh, I get it, sorry.

@theory

Done in #241.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 7, 2010
  1. @theory

    Switch to Pod::Simple::XHTML.

    theory authored
    There are a few reasons for this:
    
    * It's HTML output is *much* cleaner.
    * You can tell it not to emit headers and footers directly.
    
    The only downside is that you need a fairly recent version of Pod::Simple for
    it to be there and really solid. I recommend 3.12 or higher, and at least
    3.11.
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 11 deletions.
  1. +1 −1  README.md
  2. +2 −10 lib/github/markups.rb
View
2  README.md
@@ -17,7 +17,7 @@ you wish to run the library.
* [.creole](http://wikicreole.org/) -- `gem install creole`
* [.rst](http://docutils.sourceforge.net/rst.html) -- `easy_install docutils`
* [.asciidoc](http://www.methods.co.nz/asciidoc/) -- `brew install asciidoc`
-* [.pod](http://search.cpan.org/dist/perl/pod/perlpod.pod) -- `Pod::Simple::HTML`
+* [.pod](http://search.cpan.org/dist/perl/pod/perlpod.pod) -- `Pod::Simple::XHTML`
comes with Perl >= 5.10. Lower versions should install Pod::Simple from CPAN.
* .1 - Requires [`groff`](http://www.gnu.org/software/groff/)
View
12 lib/github/markups.rb
@@ -22,13 +22,5 @@
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
+command("/usr/bin/env perldoc -MPod::Simple::XHTML -w html_header: -w html_footer:", /pod/)
+
Something went wrong with that request. Please try again.