mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
9603e3f385
commit
87e78c48e3
@ -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
|
||||
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user