From: Marek Stępniowski Date: Tue, 16 Sep 2008 10:11:29 +0000 (+0200) Subject: Don't number dedications. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/40a66c8feb465a5d40035272bfd2b95e9027b7dd?ds=inline Don't number dedications. --- 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', ''):