Esempio n. 1
0
 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
Esempio n. 2
0
 def html_cite(self) -> str:
     """ Returns the "cite" field as a string containing HTML markup """
     return render_markdown(self.cite)
Esempio n. 3
0
 def html_abstract(self) -> str:
     """ Returns the "abstract" field as a string containing HTML markup """
     return render_markdown(self.abstract)
Esempio n. 4
0
 def html_description(self) -> str:
     """ Returns the "description" field as a string containing HTML markup """
     return render_markdown(self.description)
Esempio n. 5
0
 def html_description(self) -> str:
     """Return a markdown rendered version of the "description_long" field"""
     return render_markdown(self.description)
Esempio n. 6
0
 def test_render_markdown(self):
     html = render_markdown(MD_TEXT)
     assert "<h1>" in html
     assert "<ul>" in html
     assert 'class="table"' in html
Esempio n. 7
0
 def html_description(self) -> str:
     """Return question description as HTML."""
     return render_markdown(self.description)