ignore comments in xml when indexing; make-xml-zip script
[wolnelektury.git] / apps / search / index.py
index 29e41d2..307376d 100644 (file)
@@ -25,6 +25,7 @@ import re
 import errno
 from librarian import dcparser
 from librarian.parser import WLDocument
+from lxml import etree
 import catalogue.models
 from multiprocessing.pool import ThreadPool
 from threading import current_thread
@@ -401,6 +402,8 @@ class Index(BaseIndex):
 
                 if header.tag in self.skip_header_tags:
                     continue
+                if header.tag is etree.Comment:
+                    continue
 
                 # section content
                 content = []