Blanks and underscores in html links
Look at http://search.cpan.org/~rjbs/perl-5.12.3/pod/perlsyn.pod There is a heading in the original source =head2 Switch statements The anchor that is generated somehow on the web is h2a class='u' href='#___top' title='click to go to top of document' name=Switch_statements_ Switch statements ... Note that the space in the original is translated into an underscore, and the addition of several trailing underscores. This means that the link on the page that goes like See also L/Switch statements. doesn't work, as it gets translated into a href=#Switch_statements class=podlinkpod Can someone explain the trailing underscores?
RE: Blanks and underscores in html links
On Tue, 26 Apr 2011, Karl Williamson wrote: Look at http://search.cpan.org/~rjbs/perl-5.12.3/pod/perlsyn.pod There is a heading in the original source =head2 Switch statements If you look closely, the heading is actually: | =head2 Switch statements | Xswitch Xcase Xgiven Xwhen Xdefault Everything up to the paragraph separator is part of the headline. The anchor that is generated somehow on the web is h2a class='u' href='#___top' title='click to go to top of document' name=Switch_statements_ Switch statements ... Note that the space in the original is translated into an underscore, and the addition of several trailing underscores. This means that the link on the page that goes like See also L/Switch statements. doesn't work, as it gets translated into a href=#Switch_statements class=podlinkpod Can someone explain the trailing underscores? The trailing underscores correspond to the spaces before and between the X elements at the end of the heading. Cheers, -Jan
Re: Blanks and underscores in html links
Jan Dubois j...@activestate.com writes: On Tue, 26 Apr 2011, Karl Williamson wrote: Look at http://search.cpan.org/~rjbs/perl-5.12.3/pod/perlsyn.pod There is a heading in the original source =head2 Switch statements If you look closely, the heading is actually: | =head2 Switch statements | Xswitch Xcase Xgiven Xwhen Xdefault Everything up to the paragraph separator is part of the headline. Yeah, but they're still basically trailing whitespace. I think this is a (minor) bug in whatever module generated that HTML. It should strip trailing whitespace from the heading. -- Russ Allbery (r...@stanford.edu) http://www.eyrie.org/~eagle/
RE: Blanks and underscores in html links
On Tue, 26 Apr 2011, Russ Allbery wrote: Jan Dubois j...@activestate.com writes: If you look closely, the heading is actually: | =head2 Switch statements | Xswitch Xcase Xgiven Xwhen Xdefault Everything up to the paragraph separator is part of the headline. Yeah, but they're still basically trailing whitespace. I think this is a (minor) bug in whatever module generated that HTML. It should strip trailing whitespace from the heading. Oh, I agree, I was just answering the question *why* those underscores are there. Confirming déjà vu (from April 2010): http://www.mail-archive.com/pod-people@perl.org/msg01285.html Cheers, -Jan
Re: Blanks and underscores in html links
On Apr 26, 2011, at 3:41 PM, Russ Allbery wrote: Everything up to the paragraph separator is part of the headline. Yeah, but they're still basically trailing whitespace. I think this is a (minor) bug in whatever module generated that HTML. It should strip trailing whitespace from the heading. Hrm. I thought I fixed this. https://rt.cpan.org/Ticket/Display.html?id=56572 https://github.com/theory/pod-simple/commit/51a052ed53c52dc717e38e7685124a7e2023eb0 What version of Pod::Simple are you using? Best, David