From bc93263942dfac75870b4679c631a1c91bcb6732 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 25 May 2014 16:32:14 +0530 Subject: [PATCH] DOCX Input: Fix a regression that broke conversion of documents with an index that contains fields with special page text. Fixes #1322637 [Private bug](https://bugs.launchpad.net/calibre/+bug/1322637) --- src/calibre/ebooks/docx/index.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/docx/index.py b/src/calibre/ebooks/docx/index.py index a299fc5042..bf9c44bb5c 100644 --- a/src/calibre/ebooks/docx/index.py +++ b/src/calibre/ebooks/docx/index.py @@ -60,7 +60,10 @@ def add_xe(xe, t): text = xe.get('text', '') pt = xe.get('page-number-text', None) t.text = text or ' ' - if pt: + if False and pt: + # We ignore the page numbering text as it breaks the merging code + # below, which assumes every block ends with a link. I dont have the + # time/motivation right now to fix the merging code. p = t.getparent().getparent() r = p.makeelement(expand('w:r')) p.append(r)