def generate_toc(self) -> str: """ The generate_toc() function is very big so for readability and maintainability it's broken out to a separate file. Strictly speaking that file can be inlined into this class. """ from se.se_epub_generate_toc import generate_toc return generate_toc(self)
def generate_toc(self) -> str: """ The generate_toc() function is very big so for readability and maintainability it's broken out to a separate file. Strictly speaking that file can be inlined into this class. """ from se.se_epub_generate_toc import generate_toc # pylint: disable=import-outside-toplevel toc_xhtml = generate_toc(self) # Word joiners and nbsp don't go in the ToC toc_xhtml = toc_xhtml.replace(se.WORD_JOINER, "") toc_xhtml = toc_xhtml.replace(se.NO_BREAK_SPACE, " ") return toc_xhtml