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.
|