Re: bug report to HTML::FormatText

Gisle Aas (aas@oslonett.no)
Tue, 26 Sep 1995 12:09:21 +0100


> I cannot fix this one...
> 
> line line 104 of FormatText you say
> 
>     $pre =~ s/^/$indent/gm;
> 
> which inserts some spaces to every line of preformatted text. This
> does no good, if we have a piece of preformatted text that starts in
> the middle of the line.
> 
> My HTML looks like this:
> 
> <PRE>
>   <A NAME="GAAS"></A><a href="GAAS/">GAAS</a>   <a href="http://www.oslonett.no/home/aas/">Gisle Aas</a> <a href="mailto:aas@oslonett.no">&lt;aas@oslonett.no&gt;</a>
> </PRE>
> 
> and is formatted correctly by netscape as
> 
>   GAAS   Gisle Aas <aas@oslonett.no>
> 
> but 'request -o text' prints
> 
>          GAAS         Gisle Aas       <aas@oslonett.no>   
> 
> I think, some extra switch is required near line 104, but I don't
> know which and if it isn't already there.

How about changing line 104 to:

    $pre =~ s/\n/\n$indent/g;

This will sometimes add space before \n but this is a less serious bug I 
think.  If you set the default left margin to 0 (instead of 3) then no 
additional space will be inserted.

--Gisle