+ content.append(end.tail)
+
+ # in the end, add a section text.
+ doc = add_part(snippets, header_index=position, header_type=header.tag,
+ content=fix_format(u' '.join(filter(lambda s: s is not None, frag['content']))))
+
+ self.index.addDocument(doc)
+