From 10336f7d2d43ad45e37e2d5a454b14741883731d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 31 Mar 2014 19:38:22 +0530 Subject: [PATCH] DOCX Input: Fix bug in handling of hyperlink fields containing only a single run of text --- src/calibre/ebooks/docx/to_html.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/calibre/ebooks/docx/to_html.py b/src/calibre/ebooks/docx/to_html.py index d1cd9529b1..5fe7ddcbf1 100644 --- a/src/calibre/ebooks/docx/to_html.py +++ b/src/calibre/ebooks/docx/to_html.py @@ -516,6 +516,7 @@ class Convert(object): spans = [rmap[r] for r in runs if r in rmap] if not spans: continue + span = spans[0] if len(spans) > 1: span = self.wrap_elems(spans, SPAN()) span.tag = 'a'