Skip to content

Instantly share code, notes, and snippets.

@mojombo
Created July 20, 2010 02:25
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mojombo/482383 to your computer and use it in GitHub Desktop.
Save mojombo/482383 to your computer and use it in GitHub Desktop.
[21:24][tom@lepton:~(master)]$ perl --version
This is perl, v5.10.0 built for darwin-thread-multi-2level
(with 2 registered patches, see perl -V for more detail)
[21:23][tom@lepton:~(master)]$ cat test.pod
=head1 Title
=over 4
=item 1. Item 1
=item 2. Item 2
=back
[21:23][tom@lepton:~(master)]$ perl -MPod::Simple::HTML -e Pod::Simple::HTML::go test.pod
<html><head><title>Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" >
</head>
<body class='pod'>
<!--
generated by Pod::Simple::HTML v3.03,
using Pod::Simple::PullParser v2.02,
under Perl v5.010000 at Tue Jul 20 02:23:32 2010 GMT.
If you want to change this HTML document, you probably shouldn't do that
by changing it directly. Instead, see about changing the calling options
to Pod::Simple::HTML, and/or subclassing Pod::Simple::HTML,
then reconverting this document from the Pod source.
When in doubt, email the author of Pod::Simple::HTML for advice.
See 'perldoc Pod::Simple::HTML' for more info.
-->
<!-- start doc -->
<a name='___top' class='dummyTopAnchor' ></a>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="Title"
>Title</a></h1>
<dl>
<dt><a name="1._Item_1"
>1.
Item 1
<dt><a name="2._Item_2"
>2.
Item 2</a></dt>
</dl>
<!-- end doc -->
</body></html>
[21:23][tom@lepton:~(master)]$
@theory
Copy link

theory commented Jul 20, 2010

A special case for unordered lists is to have both a bullet and a string:

% cat ~/Desktop/mojombo.pod 
=head1 Title

=over

=item * Item 1

=item * Item 2

=back
% perldoc -MPod::Simple::XHTML ~/Desktop/mojombo.pod

<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
</head>
<body>


<h1 id="Title">Title</h1>

<ul>

<li><p>Item 1</p>

</li>
<li><p>Item 2</p>

</li>
</ul>

</body>
</html>

I guess the authors thought that the same should apply to ordered lists. It may, in fact, be a bug in Pod::Simple::HTML. I'll submit it and get feedback from the pod-people list.

But in general, it's best to keep the identifier on the =item line and content on subsequent paragraphs, just to keep things consistent.

Thanks!

theory

@theory
Copy link

theory commented Jul 20, 2010

FYI: bug report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment