View Single Post
Old 03-10-2011, 05:09 PM   #10
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
It's not as simple as just using <p> tags - because typically there are numerous carriage returns inside the <pre> tags that need to get converted to markup..

From a flow perspective it would be best if each <pre> tag was replace with a <div> or <blockquote> - blockquote is better if you want slightly indented code blocks and are planning to convert to mobi. Then the content of each individual <pre> tag needs to go through text processing with preserve spaces enabled. Finally a monospace font style would ideally need to be set.

That's all just the logical flow though, while Calibre has those individual capabilities it's not logic that's been chained together.

Edit: user_none is correct about the FR - this would be a good candidate for heuristics.
ldolse is offline   Reply With Quote