mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-04 17:04:59 +01:00
FB2 Output: Fix #3941 (Converting to FB2, does not show full book in FB Reader (ver. 8 or 10))
This commit is contained in:
parent
8293b5008d
commit
ea89229c87
1 changed files with 9 additions and 3 deletions
|
|
@ -30,7 +30,7 @@
|
|||
'i' : 'emphasis',
|
||||
'p' : 'p',
|
||||
'li' : 'p',
|
||||
'br' : 'empty-line',
|
||||
'br' : 'p',
|
||||
}
|
||||
|
||||
TAG_SPACE = [
|
||||
|
|
@ -227,8 +227,14 @@ def dump_text(self, elem, stylizer, page, tag_stack=[]):
|
|||
fb2_text.append(self.get_anchor(page, id_name))
|
||||
|
||||
fb2_tag = TAG_MAP.get(tag, None)
|
||||
if fb2_tag and fb2_tag not in tag_stack:
|
||||
tag_count += 1
|
||||
if fb2_tag:
|
||||
if fb2_tag not in tag_stack:
|
||||
tag_count += 1
|
||||
else:
|
||||
tag_stack.reverse()
|
||||
tag_stack.remove(fb2_tag)
|
||||
tag_stack.reverse()
|
||||
fb2_text.append('</%s>' % fb2_tag)
|
||||
fb2_text.append('<%s>' % fb2_tag)
|
||||
tag_stack.append(fb2_tag)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue