Skip Menu |

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

Report information
The Basics
Id: 88478
Status: new
Priority: 0/
Queue: HTML-Format

Owner: Nobody in particular
Requestors: user42 [...]

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

Subject: leading space when body no <p>
Date: Sat, 07 Sep 2013 11:52:16 +1000
To: bug-HTML-Format [...]
From: Kevin Ryde <user42 [...]>
Download (untitled) / with headers
text/plain 539b
With recent debian i386 perl 5.14.2 and HTML::FormatText 2.10, the program below prints Formatted to: " This is some text. " where I hoped that it would not have the leading space, so instead Formatted to: "This is some text. " The latter is what you get if there's a <p> in the html (with or without whitespace between it and the text). I struck this when applying HTML::FormatText to some sloppy html which lacked proper <p> paragraph around its text. It'd be good if HTML::FormatText was forgiving of that sort of thing.
text/x-perl 340b
#!/usr/bin/perl -w use strict; use HTML::FormatText; my $html = " <html> <body> This is some text. </body> </html>"; my $str = HTML::FormatText->format_string ($html, leftmargin => 0, rightmargin => 40); print "Formatted to: \"$str\"\n"; exit 0;

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

Please report any issues with to