mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
fix imports from the wrong module
when module_a.submodule_a imports module_b, then module_c should not use "from module_a.submodule_a import module_b"
This commit is contained in:
parent
b9fb80d9b0
commit
2212dfc649
@ -18,9 +18,10 @@ from lxml import etree
|
||||
from calibre import as_unicode, force_unicode
|
||||
from calibre.ebooks.epub import rules
|
||||
from calibre.ebooks.oeb.base import (OEB_STYLES, XPNSMAP as NAMESPACES,
|
||||
urldefrag, rewrite_links, urlunquote, XHTML, urlnormalize)
|
||||
urldefrag, rewrite_links, XHTML, urlnormalize)
|
||||
from calibre.ebooks.oeb.polish.split import do_split
|
||||
from polyglot.builtins import iteritems, range, map
|
||||
from polyglot.urllib import unquote
|
||||
from css_selectors import Select, SelectorError
|
||||
|
||||
XPath = functools.partial(_XPath, namespaces=NAMESPACES)
|
||||
@ -179,7 +180,7 @@ class Split(object):
|
||||
nhref = anchor_map[frag if frag else None]
|
||||
nhref = self.current_item.relhref(nhref)
|
||||
if frag:
|
||||
nhref = '#'.join((urlunquote(nhref), frag))
|
||||
nhref = '#'.join((unquote(nhref), frag))
|
||||
|
||||
return nhref
|
||||
return url
|
||||
|
Loading…
x
Reference in New Issue
Block a user