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)
|
_author_pat = re.compile(',?\s+and\s+', re.IGNORECASE)
|
||||||
def string_to_authors(raw):
|
def string_to_authors(raw):
|
||||||
raw = _author_pat.sub('&', raw)
|
|
||||||
raw = raw.replace('&&', u'\uffff')
|
raw = raw.replace('&&', u'\uffff')
|
||||||
|
raw = _author_pat.sub('&', raw)
|
||||||
authors = [a.strip().replace(u'\uffff', '&') for a in raw.split('&')]
|
authors = [a.strip().replace(u'\uffff', '&') for a in raw.split('&')]
|
||||||
return authors
|
return authors
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@ class Stylizer(object):
|
|||||||
if not matches and class_sel_pat.match(text):
|
if not matches and class_sel_pat.match(text):
|
||||||
found = False
|
found = False
|
||||||
for x in tree.xpath('//*[@class]'):
|
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)
|
matches.append(x)
|
||||||
found = True
|
found = True
|
||||||
if found:
|
if found:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user