From 87cbf338c1381f5714459d8ed575c417b4ee9d3f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 12 May 2015 13:21:56 +0530 Subject: [PATCH] DOCX Output: Add support for
--- src/calibre/ebooks/docx/writer/TODO | 1 - src/calibre/ebooks/docx/writer/from_html.py | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/docx/writer/TODO b/src/calibre/ebooks/docx/writer/TODO index bbbd611223..e204341590 100644 --- a/src/calibre/ebooks/docx/writer/TODO +++ b/src/calibre/ebooks/docx/writer/TODO @@ -1,5 +1,4 @@ Table of Contents -
tag (probably as an empty block with a border) Various TODOs sprinkled through the source List image bullet Cover image diff --git a/src/calibre/ebooks/docx/writer/from_html.py b/src/calibre/ebooks/docx/writer/from_html.py index fc85bcdb15..14588f0a19 100644 --- a/src/calibre/ebooks/docx/writer/from_html.py +++ b/src/calibre/ebooks/docx/writer/from_html.py @@ -487,6 +487,9 @@ class Convert(object): # Image is floating so dont start a new paragraph for it self.add_inline_tag(tagname, html_tag, tag_style, stylizer) else: + if tagname == 'hr': + for edge in 'right bottom left'.split(): + tag_style.set('border-%s-style' % edge, 'none') self.add_block_tag(tagname, html_tag, tag_style, stylizer, float_spec=float_spec) for child in html_tag.iterchildren('*'):