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