diff --git a/src/calibre/ebooks/conversion/preprocess.py b/src/calibre/ebooks/conversion/preprocess.py index bc4df4233a..3385771228 100644 --- a/src/calibre/ebooks/conversion/preprocess.py +++ b/src/calibre/ebooks/conversion/preprocess.py @@ -554,8 +554,8 @@ class HTMLPreProcessor(object): html = smartyPants(html) html = html.replace(start, '') - # convert ellipsis to entities to prevent unwrapping - html = re.sub('(?u)(?<=\w)(\.\s?){3}', '…', html) - html = re.sub('(?u)(?<=\w)\s(\.\s?){3}', ' …', html) + # convert ellipsis to entities to prevent wrapping + html = re.sub('(?u)(?<=\w)\s?(\.\s?){2}\.', '…', html) + # nbsp gets changed to space: html = re.sub('(?u)(?<=\w)\s(\.\s?){2}\.', ' …', html) return substitute_entites(html)