From b24b166cc4de6ba7e9b1559717bb5ff6e27bdacd Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Wed, 25 Jan 2012 12:08:28 +0100 Subject: [PATCH] remove anchors from fragments --- librarian/html.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 2.20.1