mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
made conversion of nbsp to indent a bit smarter
This commit is contained in:
parent
f7e99d2e86
commit
4526ced6d1
@ -44,10 +44,14 @@ class PreProcessor(object):
|
||||
span = match.group('span')
|
||||
self.found_indents = self.found_indents + 1
|
||||
if pstyle:
|
||||
if not span:
|
||||
return '<p '+pstyle+' style="text-indent:3%">'
|
||||
if pstyle.lower().find('style'):
|
||||
pstyle = re.sub(r'"$', '; text-indent:3%"', pstyle)
|
||||
else:
|
||||
return '<p '+pstyle+' style="text-indent:3%">'+span
|
||||
pstyle = pstyle+' style="text-indent:3%"'
|
||||
if not span:
|
||||
return '<p '+pstyle+'>'
|
||||
else:
|
||||
return '<p '+pstyle+'>'+span
|
||||
else:
|
||||
if not span:
|
||||
return '<p style="text-indent:3%">'
|
||||
|
Loading…
x
Reference in New Issue
Block a user