From 926c8a3e09932478189cc103f4e02787ae66cc61 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Fri, 16 Mar 2012 10:37:48 +0100 Subject: [PATCH] nicer full html --- librarian/html.py | 4 ++++ librarian/xslt/book2html.xslt | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) 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): diff --git a/librarian/xslt/book2html.xslt b/librarian/xslt/book2html.xslt index f81f981..c7b7215 100755 --- a/librarian/xslt/book2html.xslt +++ b/librarian/xslt/book2html.xslt @@ -18,8 +18,7 @@ <xsl:apply-templates mode="inline" select="//nazwa_utworu" /> - - + + -- 2.20.1