New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pod::HTML problem: =begin html and =end html fail to respect empty lines #5476
Comments
From hughmyers@micron.comCreated by hughmyers@mail-srv1.micron.comIn Pod::HTML 1.04, =begin html/=end html eats lines that consist of single =begin html <tt> int main(int argc,char *argv[]) { printf("Hellow World\n"); } =end html should display as: #include <stdio.h> int main(int argc,char *argv[]) { printf("Hellow World\n"); } not as: #include <stdio.h>int main(int argc,char *argv[]) { printf("Hellow There is an obvious work-around of 'no blank lines--use ' --hsm Perl Info
|
From renee.baecker@smart-websolutions.deAttached is a small patch for Pod::Html (against Pod::Html 1.09_04). -- XING: http://www.xing.com/profile/Renee_Baecker |
From renee.baecker@smart-websolutions.deHtml.pm.patch--- Html.pm.orig 2008-06-30 12:03:43.000000000 +0200
+++ Html.pm 2008-06-30 12:02:32.000000000 +0200
@@ -308,6 +308,7 @@
# now convert this file
my $after_item; # set to true after an =item
warn "Converting input file $Podfile\n" if $Verbose;
+ my $is_pre = 0;
foreach my $i (0..$#poddata){
$_ = $poddata[$i];
$Paragraph = $i+1;
@@ -348,7 +349,18 @@
else {
next if $Ignore;
next if @Begin_Stack && $Begin_Stack[-1] ne 'html';
- print HTML and next if @Begin_Stack && $Begin_Stack[-1] eq 'html';
+
+ if( @Begin_Stack && $Begin_Stack[-1] eq 'html' and /<\/pre>/ ){
+ $is_pre = 0;
+ }
+
+ if( @Begin_Stack && $Begin_Stack[-1] eq 'html' and /<pre>.*?(?<!<\/pre>)/ ){
+ $is_pre = 1;
+ }
+
+ my $nl = $is_pre ? "\n\n" : "\n";
+ print HTML ($_,$nl) and next if @Begin_Stack && $Begin_Stack[-1] eq 'html';
+
my $text = $_;
# Open tag for definition list as we have something to put in it
|
From renee.baecker@smart-websolutions.deHere it is... Bram wrote:
-- XING: http://www.xing.com/profile/Renee_Baecker |
From renee.baecker@smart-websolutions.deuse strict; my my $admin = $Config{'perladmin'}; my $expected = <<"EXPECTED"; <body style="background-color: white"> <!-- INDEX BEGIN --> <ul> <li><a href="#name">NAME</a></li> <li><a href="#testcase">TESTCASE</a></li> </ul> <hr name="index" /> <p> int main(int argc,char *argv[]) { printf("Hellow World\\n"); </body> </html> my $check; { $check =~ s/\r?\n/\n/g; is( $check, $expected ); 1 while unlink $out; =head1 NAME 9385.pl - A testscript for bug #9385 =head2 TESTCASE The following testcase shows the bug in Pod::Html =begin html <tt> int main(int argc,char *argv[]) { printf("Hellow World\n"); this is a test line in an HTML section of this Pod. =end html |
From david@landgren.netRenée Bäcker a écrit :
I've just discovered this message, as I summarise a fortnight's worth of Anyway, 1.09_04 is on CPAN, but not in blead, since the first step of So, at the moment, development is stalled until I hear otherwise. David |
From @jkeenanI am attaching what I believe is a very slightly cleaned-up version of |
From @jkeenanuse strict; my my $admin = $Config{'perladmin'}; my $expected = <<"EXPECTED"; <body style="background-color: white"> <!-- INDEX BEGIN --> <ul> <li><a href="#name">NAME</a></li> <li><a href="#testcase">TESTCASE</a></li> </ul> <hr name="index" /> <p> int main(int argc,char *argv[]) { printf("Hellow World\\n"); </body> </html> my $check; { $check =~ s/\r?\n/\n/g; is( $check, $expected ); 1 while unlink $out; =head1 NAME 9385.pl - A testscript for bug #9385 =head2 TESTCASE The following testcase shows the bug in Pod::Html =begin html <tt> int main(int argc,char *argv[]) { printf("Hellow World\n"); this is a test line in an HTML section of this Pod. =end html |
From @jkeenanOn Mon Mar 26 18:10:25 2012, jkeenan wrote:
The original bug report -- back in 2002! -- summarized the problem like ##### There no longer appears to be a subroutine called clean_data() in Thank you very much. |
From matt.follett@gmail.comIt looks like this ticket should probably be moved over to Pod::Simple. I think this issue may be On Mon Mar 26 18:28:49 2012, jkeenan wrote:
|
From @jkeenanOn Sat Nov 17 15:58:57 2012, mfollett wrote:
I agree. I have filed a ticket in Pod-Simple's own bug tracker at: https://rt.cpan.org/Ticket/Display.html?id=91851 Closing this ticket. Thank you very much. |
@jkeenan - Status changed from 'open' to 'rejected' |
From dwheeler@cpan.orgI believe this issue is fixed as of http://github.com/theory/pod-simple/commits/bb23b85. Additional testing would be much appreciated! |
Migrated from rt.perl.org#9385 (status was 'rejected')
Searchable as RT9385$
The text was updated successfully, but these errors were encountered: