def test_markdown_mentions_dict(self): """ markdown mentions dict """ comment = "@nitely, @esteban" md = Markdown(escape=True, hard_wrap=True) comment_md = md.render(comment) # mentions get dianmically added on MentionifyExtension self.assertDictEqual(md.get_mentions(), {'nitely': self.user, 'esteban': self.user2})
def test_markdown_mentions_dict(self): """ markdown mentions dict """ comment = "@nitely, @esteban" md = Markdown(escape=True, hard_wrap=True) comment_md = md.render(comment) # mentions get dianmically added on MentionifyExtension self.assertDictEqual(md.get_mentions(), { 'nitely': self.user, 'esteban': self.user2 })
def _get_comment_html(self): markdown = Markdown(escape=True, hard_wrap=True) comment_html = markdown.render(self.cleaned_data['comment']) self.mentions = markdown.get_mentions() return comment_html
def _get_description_html(self): markdown = Markdown(escape=True, hard_wrap=True) description_html = markdown.render(self.cleaned_data['description']) self.mentions = markdown.get_mentions() return description_html