mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-06 03:05:05 +01:00
Fix FB2 TOC links.
This commit is contained in:
parent
37002f9b91
commit
a72fd264fe
2 changed files with 6 additions and 2 deletions
|
|
@ -22,3 +22,7 @@ src/cssutils/stylesheets/.svn/
|
|||
src/odf/.svn
|
||||
tags
|
||||
nbproject/
|
||||
*.mdproj
|
||||
*.pidb
|
||||
*.sln
|
||||
*.userprefs
|
||||
|
|
|
|||
|
|
@ -230,8 +230,8 @@ def dump_text(self, elem, stylizer, page, tag_stack=[]):
|
|||
if '://' in href:
|
||||
fb2_text.append('<a xlink:href="%s">' % href)
|
||||
else:
|
||||
if '#' not in href:
|
||||
href += '#'
|
||||
if href.startswith('#'):
|
||||
href = href[1:]
|
||||
if href not in self.link_hrefs.keys():
|
||||
self.link_hrefs[href] = 'calibre_link-%s' % len(self.link_hrefs.keys())
|
||||
href = self.link_hrefs[href]
|
||||
|
|
|
|||
Loading…
Reference in a new issue