HTML::FormatText

Alex Tang (altitude@iname.com)
Tue, 9 Jun 1998 19:21:56 -0400 (EDT)


Hi folks.

I've been working with the HTML::FormatText/HTML::Parse/HTML::Parser
routines to do some conversion between HTML and plain text.  It seems that
the "rightmargin" attribute of the FormatText object doesn't do what one
would expect.  If you set the right margin to 50, it will wrap the line
(by inserting a \n before the line) when the position of the >FIRST<
character of a word occurs after the right margin.  I think I would
expect the line to get wrapped when the LAST character of the word occurs
after the right margin. 

For example, if the following HTML text were to get parsed with a left
margin of "2" and a right margin of "50":

    <HTML>
    There should be some wrapping going on here.  EXAAMPLEREALLYLONGWORD.
    </HTML>

The output would look like:

  There should be some wrapping going on here.  EXAAMPLEREALLYLONGWORD.

I would expect the text to wrap before "EXAAMPLEREALLYLONGWORD" so it
should look like:

  There should be some wrapping going on here.
  EXAAMPLEREALLYLONGWORD.

Is this a bug?  Or am i just nuts...

Thanks a bunch!

...alex...

-- 
**                    Alex Tang ** altitude@iname.com                  **
**  "I was drugged and left for dead in Mexico and                     **
**   all I got was this stupid T-Shirt" --The Game                     **