From 87e78c48e358ba901f2d00e29bde314a681be255 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 24 Jun 2009 17:51:35 -0700 Subject: [PATCH] ... --- src/calibre/ebooks/metadata/__init__.py | 2 +- src/calibre/ebooks/oeb/stylizer.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/metadata/__init__.py b/src/calibre/ebooks/metadata/__init__.py index 9be40f9b49..134a0c3c23 100644 --- a/src/calibre/ebooks/metadata/__init__.py +++ b/src/calibre/ebooks/metadata/__init__.py @@ -15,8 +15,8 @@ from calibre import relpath _author_pat = re.compile(',?\s+and\s+', re.IGNORECASE) def string_to_authors(raw): - raw = _author_pat.sub('&', raw) raw = raw.replace('&&', u'\uffff') + raw = _author_pat.sub('&', raw) authors = [a.strip().replace(u'\uffff', '&') for a in raw.split('&')] return authors diff --git a/src/calibre/ebooks/oeb/stylizer.py b/src/calibre/ebooks/oeb/stylizer.py index 5f923c4311..5fcc7e3fac 100644 --- a/src/calibre/ebooks/oeb/stylizer.py +++ b/src/calibre/ebooks/oeb/stylizer.py @@ -169,7 +169,7 @@ class Stylizer(object): if not matches and class_sel_pat.match(text): found = False for x in tree.xpath('//*[@class]'): - if '.'+x.get('class').lower() in text.lower(): + if text.lower().endswith('.'+x.get('class').lower()): matches.append(x) found = True if found: