View Single Post
Old 02-20-2008, 01:00 PM   #17
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by JSWolf View Post
I've figured out what is going on and why the bug exists.

the blank lines are <br /> and they are not being picked up and converted to a blank line. If you fix that, you'll be good to go. I looked at the expanded HTML and yes, it had <br /> for the blank lines.

So no, I do not need to test version 7. Just get a fixed version 8 or a version 9.
You are right about the <br /> issue. It surfaces when using the '--nopara' as the eBook Publisher doesn't seem to respond to it beside the <div> construct. I have seen this in past conversions I did before the 'mobi2imp' days.

I have a work-around fix that could be inserted after line 289 in 'mobi2imp.pl' (just after the <body> tag substitution):
Code:
if (defined $opt_nopara) {
    $html =~ s/<br([^>])*><div/<BR \/><BR \/><div/g;  #force <br /> to work better in ebook Publisher
}
This is better than just forcing two <br />'s everywhere (what I tried first and didn't like!) Further testing is required to ensure this doesn't 'break' something else...

I used this 'fix' to produce the attached .IMP version of 'The Heretic.prc'

Is this better?

-Nick

p.s. the links to Chapter 9, Chapter 10 and Chapter 22 don't get fixed by the mobi code in 'mobi2imp' so you may want to check the original .prc to see if it is working properly. Also, in Chapter 40, I noticed an extra line para break ('<br /><br /><div') where the original .prc has a '<br /><div' which probably shouldn't be there

Last edited by nrapallo; 02-21-2008 at 05:31 PM. Reason: see JSWolf's .IMP version of 'The Heretic.prc'
nrapallo is offline   Reply With Quote