mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-22 23:17:16 +01:00
Fix bug 2587: Only add \n's to head if they are not alreay present.
This commit is contained in:
parent
7999b3c188
commit
fb92bbbf50
1 changed files with 3 additions and 1 deletions
|
|
@ -21,7 +21,9 @@
|
|||
def sanitize_head(match):
|
||||
x = match.group(1)
|
||||
x = _span_pat.sub('', x)
|
||||
return '<head>\n'+x+'\n</head>'
|
||||
x = ('\n%s' % x) if not x.startswith('\n') else x
|
||||
x += '\n' if not x.endswith('\n') else ''
|
||||
return '<head>%s</head>' % x
|
||||
|
||||
def chap_head(match):
|
||||
chap = match.group('chap')
|
||||
|
|
|
|||
Loading…
Reference in a new issue