CC: | hughmyers [...] micron.com, matt.follett [...] gmail.com, davem [...] iabyn.com, david [...] landgren.net, renee.baecker [...] smart-websolutions.de |
Subject: | Pod::HTML problem: =begin html and =end html fail to respect empty lines |
This problem was originally reported by Hugh Myers in May 2002 in the Perl 5 bug queue as https://rt.perl.org/Ticket/Display.html?id=9385. It was reported there on the assumption that it was a bug in Pod::Html. However, AFAICT Pod::Html does nothing with '=begin html' and '=end html'. Pod::Html is, in part, a wrapper around Pod::Simple::XHTML::LocalPodLinks and other parts of the Pod-Simple distribution. So I am moving it into Pod-Simple's own bug tracker.
Here is the original report:
#####
This is a bug report for perl from hughmyers@mail-srv1.micron.com, generated with the help of perlbug 1.33 running under perl v5.6.1.
-----------------------------------------------------------------
[Please enter your report here]
In Pod::HTML 1.04, =begin html/=end html eats lines that consist of single newlines, i.e. "\n". This happens because the sub clean_data is applied to the body of text before parsing. This converts the text into 'paragraphs',
text delimited by blank lines, which discards the delimiter. As an example, the fragment:
=begin html
<tt>
<pre>
#include <stdio.h>
int main(int argc,char *argv[]) {
printf("Hellow World\n");
return 0;
}
</pre>
</tt>
=end html
should display as:
#include <stdio.h>
int main(int argc,char *argv[]) {
printf("Hellow World\n");
return 0;
}
not as:
#include <stdio.h>int main(int argc,char *argv[]) { printf("Hellow
World\n");
return 0;}
There is an obvious work-around of 'no blank lines--use '
--hsm
#####
Please see the original RT for various test files which have been posted over the years.
Thank you very much.
Jim Keenan