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

Moved entity_to_unicode function to utils.entities module.

This commit is contained in:
2021-01-03 18:52:13 +01:00
parent 3152c52839
commit 839cc3c79a
6 changed files with 20 additions and 76 deletions

View File

@@ -50,7 +50,7 @@ DEFAULT_SOURCE_ENCODING = "cp1252" # default is us-windows character set
DEFAULT_GENREADING = "fs" # default is yes to both lrf and lrs
from ebook_converter.constants_old import __appname__, __version__
from ebook_converter import entity_to_unicode
from ebook_converter.utils import entities
class LrsError(Exception):
@@ -737,7 +737,8 @@ class TableOfContents(object):
class TocLabel(object):
def __init__(self, label, textBlock):
self.label = escape(re.sub(r'&(\S+?);', entity_to_unicode, label))
self.label = escape(re.sub(r'&(\S+?);', entities.entity_to_unicode,
label))
self.textBlock = textBlock
def toElement(self, se):