Exemplo n.º 1
0
 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})
Exemplo n.º 2
0
 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
     })
Exemplo n.º 3
0
 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
Exemplo n.º 4
0
 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