diff --git a/src/calibre/ebooks/docx/fields.py b/src/calibre/ebooks/docx/fields.py index d43bc89ce8..82e2c206d2 100644 --- a/src/calibre/ebooks/docx/fields.py +++ b/src/calibre/ebooks/docx/fields.py @@ -26,7 +26,12 @@ class Field(object): if not raw: return if self.name is None: - self.name, raw = raw.strip().partition(' ')[0::2] + # There are cases where partial index entries end with + # a significant space, along the lines of + # <>Summary <> ... <>Hearing<>. + # No known examples of starting with a space yet. + # self.name, raw = raw.strip().partition(' ')[0::2] + self.name, raw = raw.lstrip().partition(' ')[0::2] self.buf.append(raw) def finalize(self):