mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-03 20:16:06 +01:00
oops
This commit is contained in:
parent
d4b540b8cf
commit
9eee4a67b6
2 changed files with 4 additions and 3 deletions
|
|
@ -292,7 +292,7 @@ def Book(options, logger, font_delta=0, header=None,
|
|||
raise ConversionError, 'Could not find the normal version of the ' + family + ' font'
|
||||
return book, fonts
|
||||
|
||||
def entity_to_unicode(self, match):
|
||||
def entity_to_unicode(match):
|
||||
ent = match.group(1)
|
||||
if ent.startswith(u'#x'):
|
||||
return unichr(int(ent[2:], 16))
|
||||
|
|
|
|||
|
|
@ -51,11 +51,12 @@ def fget(self):
|
|||
if not role:
|
||||
role = elem.get('opf:role')
|
||||
if role == 'aut':
|
||||
au = elem.string.split(',')
|
||||
raw = self.ENTITY_PATTERN.sub(entity_to_unicode, elem.string)
|
||||
au = raw.split(',')
|
||||
ans = []
|
||||
for i in au:
|
||||
ans.extend(i.split('&'))
|
||||
return self.ENTITY_PATTERN.sub(entity_to_unicode, ans)
|
||||
return ans
|
||||
return None
|
||||
return property(doc=doc, fget=fget)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue