def html_description(self): """ Uses the ddionrails Markdown parser (ddionrails.helpers) to render the description into HTML. """ try: html = render_markdown(self.description) except AttributeError: html = "" return html
def html_cite(self) -> str: """ Returns the "cite" field as a string containing HTML markup """ return render_markdown(self.cite)
def html_abstract(self) -> str: """ Returns the "abstract" field as a string containing HTML markup """ return render_markdown(self.abstract)
def html_description(self) -> str: """ Returns the "description" field as a string containing HTML markup """ return render_markdown(self.description)
def html_description(self) -> str: """Return a markdown rendered version of the "description_long" field""" return render_markdown(self.description)
def test_render_markdown(self): html = render_markdown(MD_TEXT) assert "<h1>" in html assert "<ul>" in html assert 'class="table"' in html
def html_description(self) -> str: """Return question description as HTML.""" return render_markdown(self.description)