hsmyers has asked for the wisdom of the Perl Monks concerning the following question:

The fix to Pod::Html 1.4 worked great—almost! Sad to say there is still a problem with blank lines embedded within =begin html/=end html blocks. For instance if you give Pod2html the following pod chunk:
=begin html <PRE> This is line one. This is line two. This is line three. (There should be a blank line above.) </PRE> =end html =cut
You regrettably get this back out:
<HTML> <HEAD> <TITLE>wall.txt</TITLE> <LINK REV="made" HREF="mailto:"> </HEAD> <BODY> <A NAME="__index__"></A> <!-- INDEX BEGIN --> <!-- INDEX END --> <PRE> This is line one. This is line two.This is line three. (There should be a blank line abo +ve.) </PRE> </BODY> </HTML>
Since the actual material to be html'd is source code, the notion of using =for html ...whatever... doesn't seem like it will fly. I suppose I could debug the module, although having read through it once over lightly, I'm not to eager to dive in the deep end. Perhaps a post processor? Suggestions?

hsm

Replies are listed 'Best First'.
Re: Pod2Html Problem Redux
by jmcnamara (Monsignor) on Sep 27, 2001 at 12:02 UTC

    Replacing the blank line with a space and a newline will get it to parse properly. However, it isn't really a blank line then. :-(

    There is an also an alternative version of Pod::HTML called Marek::Pod::HTML. This was intended as a direct replacement for Pod::HTML.

    I read about this a while ago on clpm but haven't tried it.

    John.
    --

      John,

      I found Marek::Pod::Html yesterday, but I've not had time to give it a go—sometimes playing with bugs is more interesting than the project at hand! My plan is to take Html.pm apart and see what makes it tick, wrong that is. In the mean time I've slapped a pre/post(whatever) processor on the problem which replaces \n\n with something(anything) before I hand it off to Pod2Html. Looking ahead, I probably would have had to add such a mechanism anyway—parsing is mostly just another way of spelling problem...

      hsm