mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
[SNBOutput] Fix bugs in handling <li> <img> and bookmark.
This commit is contained in:
parent
8f3e1ca4d5
commit
f0fb8fb12a
@ -206,7 +206,7 @@ class SNBMLizer(object):
|
||||
if elem.attrib.get('id') != None and elem.attrib['id'] in [ href for href, title in subitems ]:
|
||||
if self.curSubItem != None and self.curSubItem != elem.attrib['id']:
|
||||
self.curSubItem = elem.attrib['id']
|
||||
text.append(u'%s%s\n\n' % (CALIBRE_SNB_BM_TAG, self.curSubItem))
|
||||
text.append(u'\n\n%s%s\n\n' % (CALIBRE_SNB_BM_TAG, self.curSubItem))
|
||||
|
||||
if style['display'] in ('none', 'oeb-page-head', 'oeb-page-foot') \
|
||||
or style['visibility'] == 'hidden':
|
||||
@ -226,13 +226,13 @@ class SNBMLizer(object):
|
||||
text.append(u' ')
|
||||
|
||||
if tag == 'img':
|
||||
text.append(u'%s%s' % (CALIBRE_SNB_IMG_TAG, ProcessFileName(elem.attrib['src'])))
|
||||
text.append(u'\n\n%s%s\n\n' % (CALIBRE_SNB_IMG_TAG, ProcessFileName(elem.attrib['src'])))
|
||||
|
||||
if tag == 'br':
|
||||
text.append(u'\n\n')
|
||||
|
||||
if tag == 'li':
|
||||
li = '-- '
|
||||
li = '- '
|
||||
|
||||
pre = (tag == 'pre' or pre)
|
||||
# Process tags that contain text.
|
||||
|
Loading…
x
Reference in New Issue
Block a user