mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-04-15 18:43:30 +02:00
Moved xml_entity_to_unicode partial to utils.entities module.
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
import re, codecs
|
||||
import codecs
|
||||
import re
|
||||
|
||||
from ebook_converter.utils import entities
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
_encoding_pats = (
|
||||
# XML declaration
|
||||
@@ -94,8 +93,7 @@ def find_declared_encoding(raw, limit=50*1024):
|
||||
|
||||
|
||||
def substitute_entites(raw):
|
||||
from ebook_converter import xml_entity_to_unicode
|
||||
return ENTITY_PATTERN.sub(xml_entity_to_unicode, raw)
|
||||
return ENTITY_PATTERN.sub(entities.xml_entity_to_unicode, raw)
|
||||
|
||||
|
||||
_CHARSET_ALIASES = {"macintosh" : "mac-roman",
|
||||
|
||||
Reference in New Issue
Block a user