Hi fandrieu,
I'm getting consistent results with many, many books with the latest script (from post #206), so thanks for your efforts!
I wanted to point out one potential problem area, though. Line 1036:
Code:
entry = re.sub('^', indent, entry, 0, re.M)
The above code will only work with python 2.7. If you want to include 2.6 and 2.5 users, consider replacing that line with this compatible code:
Code:
entry = re.sub(re.compile('^', re.M), indent, entry, 0)