mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
import conf.prefs when needed
This commit is contained in:
parent
868d43af68
commit
5e0869d9c9
@ -8,7 +8,6 @@ __docformat__ = 'restructuredtext en'
|
|||||||
import functools, re
|
import functools, re
|
||||||
|
|
||||||
from calibre import entity_to_unicode
|
from calibre import entity_to_unicode
|
||||||
from calibre.utils.config import prefs
|
|
||||||
|
|
||||||
XMLDECL_RE = re.compile(r'^\s*<[?]xml.*?[?]>')
|
XMLDECL_RE = re.compile(r'^\s*<[?]xml.*?[?]>')
|
||||||
SVG_NS = 'http://www.w3.org/2000/svg'
|
SVG_NS = 'http://www.w3.org/2000/svg'
|
||||||
@ -525,6 +524,7 @@ class HTMLPreProcessor(object):
|
|||||||
|
|
||||||
if getattr(self.extra_opts, 'asciiize', False):
|
if getattr(self.extra_opts, 'asciiize', False):
|
||||||
from calibre.ebooks.unihandecode import Unihandecoder
|
from calibre.ebooks.unihandecode import Unihandecoder
|
||||||
|
from calibre.utils.config import prefs
|
||||||
unihandecoder = Unihandecoder(lang=prefs['language'])
|
unihandecoder = Unihandecoder(lang=prefs['language'])
|
||||||
html = unihandecoder.decode(html)
|
html = unihandecoder.decode(html)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user