mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
MOBI Output: Do not collapse whitespace when setting the comments metadata in newly created MOBI files
This commit is contained in:
parent
6a81e30de6
commit
db4416a736
@ -494,7 +494,9 @@ class MobiWriter(object):
|
|||||||
creators = [normalize(unicode(c)) for c in items]
|
creators = [normalize(unicode(c)) for c in items]
|
||||||
items = ['; '.join(creators)]
|
items = ['; '.join(creators)]
|
||||||
for item in items:
|
for item in items:
|
||||||
data = self.COLLAPSE_RE.sub(' ', normalize(unicode(item)))
|
data = normalize(unicode(item))
|
||||||
|
if term != 'description':
|
||||||
|
data = self.COLLAPSE_RE.sub(' ', data)
|
||||||
if term == 'identifier':
|
if term == 'identifier':
|
||||||
if data.lower().startswith('urn:isbn:'):
|
if data.lower().startswith('urn:isbn:'):
|
||||||
data = data[9:]
|
data = data[9:]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user