def add_index(post, writer): # Ensure the content is stripped of any html. content = htmltomarkdown(post.content) writer.update_document(title=post.title, content=content, tags=post.tag_val, author=post.author.profile.name, uid=post.uid, lastedit_date=post.lastedit_date)
def htmltomarkdown(text): return helpers.htmltomarkdown(text)