From: Radek Czajka Date: Wed, 25 Jan 2012 11:08:28 +0000 (+0100) Subject: remove anchors from fragments X-Git-Tag: 1.7~170^2~3 X-Git-Url: https://git.mdrn.pl/librarian.git/commitdiff_plain/b24b166cc4de6ba7e9b1559717bb5ff6e27bdacd remove anchors from fragments --- diff --git a/librarian/html.py b/librarian/html.py index 39e5a01..b126638 100644 --- a/librarian/html.py +++ b/librarian/html.py @@ -163,7 +163,8 @@ def extract_fragments(input_filename): # Process all elements except begin and end else: # Omit annotation tags - if len(element.get('name', '')) or element.get('class', '') == 'annotation': + if (len(element.get('name', '')) or + element.get('class', '') in ('annotation', 'anchor')): if event == 'end' and element.tail: for fragment_id in open_fragments: open_fragments[fragment_id].append('text', element.tail)