def test_markdown_function(self): string = 'this is a *markdown* string' self.assertEqual( markdown(string), Markup('<p>this is a ' '<em>markdown</em> ' 'string</p>\n'))
def get_text(self): if hasattr(self, 'body'): text = self.body elif hasattr(self, 'description'): text = self.description else: text = self.summary or "" if self.content_format == "markdown": return markdown(text) else: return text
def get_text(self): if self.content_format == "markdown": return markdown(self.description) else: return self.description