mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix FB2 TOC links.
This commit is contained in:
parent
37002f9b91
commit
a72fd264fe
@ -22,3 +22,7 @@ src/cssutils/stylesheets/.svn/
|
||||
src/odf/.svn
|
||||
tags
|
||||
nbproject/
|
||||
*.mdproj
|
||||
*.pidb
|
||||
*.sln
|
||||
*.userprefs
|
||||
|
@ -230,8 +230,8 @@ class FB2MLizer(object):
|
||||
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…
x
Reference in New Issue
Block a user