forked from LiveCarta/BookConverter
Merge pull request #310 from Teqniksoft/kiryl/converter_fix
Change processing of anchor ids
This commit is contained in:
@@ -309,7 +309,7 @@ class EpubConverter:
|
||||
|
||||
@staticmethod
|
||||
def create_unique_id(href: str, id_: str) -> str:
|
||||
return re.sub(r"([^\w\s])|_|-", "", href) + re.sub(r"[_-]", "0", id_)
|
||||
return "id" + re.sub(r'[\W_]+', "", href) + re.sub(r'[\W_]+', "0", id_)
|
||||
|
||||
def match_href_to_path_from_toc(self,
|
||||
cur_file_path: str,
|
||||
|
||||
Reference in New Issue
Block a user