forked from LiveCarta/BookConverter
Change processing of anchor ids
This commit is contained in:
@@ -309,7 +309,7 @@ class EpubConverter:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def create_unique_id(href: str, id_: str) -> str:
|
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,
|
def match_href_to_path_from_toc(self,
|
||||||
cur_file_path: str,
|
cur_file_path: str,
|
||||||
|
|||||||
Reference in New Issue
Block a user