From 093999d8474049bc0dfd600efda5d9694f58f591 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 10 May 2013 13:22:41 +0530 Subject: [PATCH] ... --- src/calibre/ebooks/docx/to_html.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/docx/to_html.py b/src/calibre/ebooks/docx/to_html.py index bf50cdc05e..04bb0b5061 100644 --- a/src/calibre/ebooks/docx/to_html.py +++ b/src/calibre/ebooks/docx/to_html.py @@ -114,11 +114,11 @@ class Convert(object): def convert_p(self, p): dest = P() + style = self.styles.resolve_paragraph(p) for run in XPath('descendant::w:r')(p): span = self.convert_run(run) dest.append(span) - style = self.styles.resolve_paragraph(p) m = re.match(r'heading\s+(\d+)$', style.style_name or '', re.IGNORECASE) if m is not None: n = min(1, max(6, int(m.group(1))))