aerkalov/ebooklib

Issue about section link in nav.xhtml

ANXIETIER opened this issue · 0 comments

At line 1164 in file epub.py, if link inculdes separator as '/', code*
os.path.relpath(item.href, nav_dir_name)
of
a = etree.SubElement(li, 'a', {'href': os.path.relpath(item.href, nav_dir_name)})
returns link string with separator '\' which not supported in sigil.

I tried that the code
os.path.relpath(item.href, nav_dir_name).replace('\\', '/')
can solve my problem, I dont know if other lines with code* can make same bug.