From 40a66c8feb465a5d40035272bfd2b95e9027b7dd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20St=C4=99pniowski?= Date: Tue, 16 Sep 2008 12:11:29 +0200 Subject: [PATCH 1/1] Don't number dedications. --- lib/librarian/html.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librarian/html.py b/lib/librarian/html.py index 3a221ae3c..bb5a637a2 100644 --- a/lib/librarian/html.py +++ b/lib/librarian/html.py @@ -174,7 +174,6 @@ def add_anchor(element, number): def any_ancestor(element, test): for ancestor in element.iterancestors(): if test(ancestor): - print element, ancestor return True return False @@ -182,7 +181,8 @@ def any_ancestor(element, test): def add_anchors(root): counter = 1 for element in root.iterdescendants(): - if any_ancestor(element, lambda e: e.get('class') in ('note', 'motto', 'motto_podpis') or e.tag == 'blockquote'): + if any_ancestor(element, lambda e: e.get('class') in ('note', 'motto', 'motto_podpis', 'dedication') + or e.tag == 'blockquote'): continue if element.tag == 'p' and 'verse' in element.get('class', ''): -- 2.20.1