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
|
src/odf/.svn
|
||||||
tags
|
tags
|
||||||
nbproject/
|
nbproject/
|
||||||
|
*.mdproj
|
||||||
|
*.pidb
|
||||||
|
*.sln
|
||||||
|
*.userprefs
|
||||||
|
@ -230,8 +230,8 @@ class FB2MLizer(object):
|
|||||||
if '://' in href:
|
if '://' in href:
|
||||||
fb2_text.append('<a xlink:href="%s">' % href)
|
fb2_text.append('<a xlink:href="%s">' % href)
|
||||||
else:
|
else:
|
||||||
if '#' not in href:
|
if href.startswith('#'):
|
||||||
href += '#'
|
href = href[1:]
|
||||||
if href not in self.link_hrefs.keys():
|
if href not in self.link_hrefs.keys():
|
||||||
self.link_hrefs[href] = 'calibre_link-%s' % len(self.link_hrefs.keys())
|
self.link_hrefs[href] = 'calibre_link-%s' % len(self.link_hrefs.keys())
|
||||||
href = self.link_hrefs[href]
|
href = self.link_hrefs[href]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user