Quote:
Originally Posted by JimmXinu
replace_br_with_p is a heuristic or 'best effort' feature. It's never going to be perfect. And I believe it was designed to replace double <br> tags between paragraphs with <p> tags, not to unwrap lines.
|
The problem is with the way ffn and others does things, they really screw up everything. You post a story, and what does ffn do? they replace each paragraph with br-br, destroying important structural information.
Sadly sometime FFn or an author have no discernible structure, with parts of the chapter being vastly different from the rest, and in those cases replace_br_with_p throws its marbles and either does nothing (if you are lucky), or goes on a rampage on the chapter.
replace_br_with_p tries to determine what number of breaks should count as a new paragraph. Anything less than that is supposed to be collapsed, more is seen as segment breaks.
You can't just say "two breaks or more = paragraph", as some have that many breaks per line, and for instance four breaks paragraphs.
This is often the case for older stories, where the author may have imported an email formatted story into ffn, or word, before importing THAT into ffn. ffn then replaces each line break with br-br.
Just look at this text. Because mobileread doesn't have proper formatting for paragraphs, I'm using double line breaks to emulate those paragraphs. In ffn that would translate to 4 br tags.