Re: lwp-0.04 released

Andreas Koenig (k@anna.mind.de)
Fri, 8 Sep 1995 16:10:28 +0200


  >Changes since 0.03 are:
  >
  > o  Implemented module to parse HTML.

This is my favorite. Trying to clean up my own HTML code, I find two
major problems. Before I try to fix the first I want to let you know.


(1)
asHTML()'s use of whitespace to make the structure of the document
visible is not clean enough.

    <B>bold</B>, ...

turns into

      <B>bold
      </B>
      , ...

and introduces whitespace between the endtag and the comma. The fix
would probably a hash table of tags that are whitespace
insensitive. But I'm not sure.


(2)
The second problem has an easier fix. <LI> doesn't deserve an implicit
<P>, does it?

*** /usr/sources/perl/module/lwp/lwp-0.04/lib/HTML/Parse.pm   Wed Sep  6 01:51:32 1995
--- Parse.pm    Fri Sep  8 16:03:41 1995
***************
*** 424,430 ****
            insertTag($html, 'body');
            $pos = insertTag($html, 'p');
        } elsif ($ptag eq 'body' ||
-                $ptag eq 'li'   ||
                 $ptag eq 'dd'   ||
                 $ptag eq 'form') {
            $pos = insertTag($html, 'p');
--- 424,429 ----



Thank you, Gisle, (BTW, can you tell us how your name is pronounced?)

andreas