View Single Post
Old 01-23-2015, 01:14 PM   #3668
Feynor
Enthusiast
Feynor began at the beginning.
 
Posts: 38
Karma: 10
Join Date: Sep 2013
Device: Samsung Galaxy Note 10.1 2014 ed. with Moon Reader+ and Google Books.
Addition, it's been a long time since I wrote that code, and IIRC it won't convert breaks inside a paragraph (<p>) tag.

I'll see if I can add a rule to ignore that rule. in cases where there are lot of the breaks.

Additional: (again)
It is as I suspected, the function shields break tags inside existing block tags (table, blockquote, p etc) as they usually mean that the text in question is pre-formatted with line breaks, rather than paragraph breaks. This could be for songs or poetry, or quotes inside a story.
The trick is to come up with a rule that'll allow me to determine if I should overrule this, and when, without breaking the cases the old rule was meant to shield.

I know where it fails, I just need to figure out how to best fix it, as it is really something AO3 is doing. However others might be doing the same thing.
Heuristics are hard!

P.S.: Jimm, I pushed a modified hpfanficarchive adapter, as I found that it left HTML comments in the story body, which would then become a garbled mess later, I don't know if that was something my br_to_p function did, but the result was that for instance Google Books wouldn't parse the output. So I simply remove all HTML comments. They serve no purpose in a story anyway.

Last edited by Feynor; 01-23-2015 at 05:14 PM. Reason: Additional data
Feynor is offline