Skip Menu |

This queue is for tickets about the HTML-Format CPAN distribution.

Report information
The Basics
Id: 9600
Status: open
Priority: 0/
Queue: HTML-Format

People
Owner: Nobody in particular
Requestors: lulu [...] lululand.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.04
Fixed in: (no value)



Subject: HTML Formatter does not insert linefeed for the DIV tag
The HTML DIV tag formats the contents inside DIV on a separate line. However, the HTML Formatter does not do so. I have attached a sample HTML file that demonstrates the problem. I am running Perl 5.8.5, Linux FC3, i686, using HTML-Format 2.0.4.
Line 1
Line 2
Here is CPAN
Line 3
 
Line 5 (line 4 is blank)
Line 6
From: lulu [...] lululand.com
I am also uploading a patch that fixes the problem. [guest - Mon Jan 10 21:26:11 2005]: Show quoted text
> The HTML DIV tag formats the contents inside DIV on a separate line. > However, the HTML Formatter does not do so. > > I have attached a sample HTML file that demonstrates the problem. > > I am running Perl 5.8.5, Linux FC3, i686, using HTML-Format 2.0.4. >
--- Formatter.pm.sav 2004-06-02 00:47:16.000000000 -0700 +++ Formatter.pm 2005-01-10 17:20:30.270890016 -0800 @@ -447,6 +447,7 @@ sub div_start # interesting only for its 'align' attribute { my($self, $node) = @_; + $self->vspace(0); my $align = $node->attr('align'); if (defined($align) && lc($align) eq 'center') { return $self->center_start; @@ -457,6 +458,7 @@ sub div_end { my($self, $node) = @_; + $self->vspace(0); my $align = $node->attr('align'); if (defined($align) && lc($align) eq 'center') { return $self->center_end;
On Mon Jan 10 21:26:11 2005, guest wrote: Show quoted text
> The HTML DIV tag formats the contents inside DIV on a separate line.
This appears to be treating a div as a para - it isn't although the output from MS products might treat it as such. Other layouts will get an awful lot of additional vertical space added needlessly by this change. I think some additional work is needed there to ensure that empty and/or nested divs without included content do not produce additional lines. I'll go along with the   in a div should force a new line, although it does look like the sample you provide is just a broken producer. Will look further at this.