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
Download (untitled) / with headers
text/plain 250b
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
Download (untitled) / with headers
text/plain 356b
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. >
Download 9600.patch
text/x-diff 577b
--- 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;
Download (untitled) / with headers
text/plain 642b
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.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.