-
- for start, end in walker(header):
- # handle fragments and themes.
+ footnote = []
+
+ def all_content(text):
+ for frag in fragments.values():
+ frag['content'].append(text)
+ content.append(text)
+ handle_text = [all_content]
+
+
+ for start, text, end in walker(header, ignore_tags=self.ignore_content_tags):
+ # handle footnotes
+ if start is not None and start.tag in self.footnote_tags:
+ footnote = []
+ def collect_footnote(t):
+ footnote.append(t)
+ handle_text.append(collect_footnote)
+ elif end is not None and footnote is not [] and end.tag in self.footnote_tags:
+ handle_text.pop()
+ doc = add_part(snippets, header_index=position, header_type=header.tag,
+ content=u''.join(footnote),
+ is_footnote=Field("is_footnote", 'true', Field.Store.NO, Field.Index.NOT_ANALYZED))
+
+ self.index.addDocument(doc)
+ #print "@ footnote text: %s" % footnote
+ footnote = []
+
+ # handle fragments and themes.