1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-02-20 00:35:47 +01:00

Moved xml_entity_to_unicode partial to utils.entities module.

This commit is contained in:
2021-01-03 19:00:17 +01:00
parent 839cc3c79a
commit 877ea68d42
4 changed files with 13 additions and 22 deletions

View File

@@ -1,13 +1,11 @@
import os
from ebook_converter import _ent_pat, xml_entity_to_unicode
from ebook_converter.customize.conversion import InputFormatPlugin, OptionRecommendation
from ebook_converter import _ent_pat
from ebook_converter.customize.conversion import InputFormatPlugin
from ebook_converter.customize.conversion import OptionRecommendation
from ebook_converter.utils import entities
__license__ = 'GPL 3'
__copyright__ = '2009, John Schember <john@nachtimwald.com>'
__docformat__ = 'restructuredtext en'
MD_EXTENSIONS = {
'abbr': 'Abbreviations',
'admonition': 'Support admonitions',
@@ -200,7 +198,7 @@ class TXTInput(InputFormatPlugin):
txt = txt.decode(ienc, 'replace')
# Replace entities
txt = _ent_pat.sub(xml_entity_to_unicode, txt)
txt = _ent_pat.sub(entities.xml_entity_to_unicode, txt)
# Normalize line endings
txt = normalize_line_endings(txt)