From 76837bbd7e74163668b5a1cf0c158dcd8ae375fe Mon Sep 17 00:00:00 2001 From: John Schember Date: Sun, 30 Jan 2011 10:00:44 -0500 Subject: [PATCH] TXT Output: Handle scene breaks defined by margin-top in the css of the OEB. --- src/calibre/ebooks/txt/txtml.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/ebooks/txt/txtml.py b/src/calibre/ebooks/txt/txtml.py index 00992a8612..bf33e5540a 100644 --- a/src/calibre/ebooks/txt/txtml.py +++ b/src/calibre/ebooks/txt/txtml.py @@ -222,6 +222,8 @@ class TXTMLizer(object): # Scene breaks. if tag == 'hr': text.append('\n\n* * *\n\n') + elif style['margin-top']: + text.append('\n\n' + '\n' * round(style['margin-top'])) # Process tags that contain text. if hasattr(elem, 'text') and elem.text: