fix_text() and multiple lines

David Siegel david.siegel at gmx.de
Mon Feb 12 05:05:59 PST 2001


Hi,

while playing with ALFS I recognized that fix_text( $text ) affects
only the first line of $text. So if you have

<some_tag>
  with multiple lines
    and spaces 
</some_tag>

fix_text only fixes "with multiple lines".

If nobody relies on this behavior I suggest replacing
    $text =~ s/^\s+//;
    $text =~ s/\s+$//;
with 
    $text =~ s/(^\s+|\s+$)//gm;

which does the magic :)

have fun,
   David





More information about the alfs-discuss mailing list