X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/941b8e6effd4c0ffff52fa7e548d866f8454dddb..refs/heads/ofop:/librarian/html.py diff --git a/librarian/html.py b/librarian/html.py index e04790f..604c92a 100644 --- a/librarian/html.py +++ b/librarian/html.py @@ -261,7 +261,11 @@ def add_table_of_contents(root): subsection_element = etree.SubElement(subsection_list, 'li') add_anchor(subsection_element, "s%d" % n, with_target=False, link_text=text) + if root.tag == 'html': + # in case of full-page output + root = root[-1][0] root.insert(0, toc) + def extract_annotations(html_path):