If any object has a
_repr_html_ method, the IPython Notebook will use it to render HTML output. It's really easy to make a simple class that permits general dynamic HTML-rich output with Markdown. Markdown is a superset of HTML, so HTML in your output string will work, too.
import markdown
class MD(str):
def _repr_html_(self):
return markdown.markdown(self)
Four little lines, and you can do this!
1 comment:
You should add +1 button to your theme. ;)
Post a Comment