Thread: LRF output
View Single Post
Old 08-17-2007, 08:29 AM   #387
Excalibur
Member
Excalibur began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Aug 2007
Device: Sony eReader 500
Can you use regular expressions in Python? That would eliminate the need for hunting down all the whitespace or wrapping an if-then around stuff. You'd just have to check to see if you were in a preformatted space such as with the white-spacere css declaration or the <pre> tag. If you were, you ignored the collapsing of white space. If not, just change white space within tags to one (div, p, etc -- the block elements) using a regular expression search & replace...

Just an idea.

Good going with the addition of hanging indent!
Excalibur is offline   Reply With Quote