Пример #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
Пример #2
0
 def html_cite(self) -> str:
     """ Returns the "cite" field as a string containing HTML markup """
     return render_markdown(self.cite)
Пример #3
0
 def html_abstract(self) -> str:
     """ Returns the "abstract" field as a string containing HTML markup """
     return render_markdown(self.abstract)
Пример #4
0
 def html_description(self) -> str:
     """ Returns the "description" field as a string containing HTML markup """
     return render_markdown(self.description)
Пример #5
0
 def html_description(self) -> str:
     """Return a markdown rendered version of the "description_long" field"""
     return render_markdown(self.description)
Пример #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
Пример #7
0
 def html_description(self) -> str:
     """Return question description as HTML."""
     return render_markdown(self.description)