View Single Post
Old 08-21-2008, 11:22 AM   #8
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,043
Karma: 4347035
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
After further testing I could find a workaround by modifying the html2mobi script, adding:

$tree->no_space_compacting(1);

just before the "$tree->parse_file" in "sub one_html_file". (A similar addition is needed in mobi2html.) Then I found this:

Fixed HTML::TreeBuilder to not remove   where it shouldn't, using patch supplied in RT 17481.

That's dated in 2006. The only TreeBuilder.pm in my system seems to be from Perl 5.8.2, dated in September 2003, so it is quite possible this "bug" is already corrected in newer systems.

Edit: I found a way to add the </p> as well, using "my $html = $tree->as_HTML(undef,undef,{});" instead of "my $html = $tree->as_HTML;" in mobi2html.

Last edited by Jellby; 08-21-2008 at 11:32 AM.
Jellby is online now   Reply With Quote