converter has asked for the wisdom of the Perl Monks concerning the following question:
I'm having a bit of a problem with pod2html rendering =item cross-references with invalid target fragment names. The following POD snippets demonstrate the problem:
Foo.pod: =head1 Foo stuff Stuff about Foo. =over =item foo see L<Bar/foo> This hack works: L<foo in the Bar manpage|Bar/item_foo> =back Bar.pod: =head1 Bar stuff Stuff about Bar. =over =item foo this item was referenced in Foo. =back
The input PODs are processed with this shell command:
for f in {Foo,Bar}.pod do pod2html \ --htmlroot=file:/ \ --outfile=${f%.pod}.html \ --podpath=$PWD \ --verbose $f done
In Bar.html the A element for the POD =item "foo" is named "item_foo":
<a name="item_foo">foo</a>
Foo.html includes this A element for the cross reference. The target fragment name is "foo", but it seems that it should be "item_foo":
see <a href="file:///home/me/perltestlib/DST/XBase/Bar.html#foo">foo i +n the Bar manpage</a>
The reference listed after "This hack works" produces the desired output:
<a href="file:///home/me/perltestlib/DST/XBase/pod_problem/Bar.html#it +em_foo">foo in the Bar manpage</a>
perl is version 5.8.0 (Linux).
I know I've probably ventured into "there are better alternatives to Pod::Html" territory, but am I missing or misunderstanding something in the documentation, or is the aforementioned workaround the only way to get valid =item cross-references?
|
---|