Skip to content

Commit

Permalink
Merge pull request #101 from juhasch/feature/markdown
Browse files Browse the repository at this point in the history
render markdown output in rst
  • Loading branch information
minrk committed Sep 15, 2015
2 parents e111266 + 4b0253d commit eb5273f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions nbconvert/templates/rst.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@
.. image:: {{ output.metadata.filenames['image/jpeg'] | urlencode }}
{% endblock data_jpg %}

{% block data_markdown %}
{{ output.data['text/markdown'] | markdown2rst }}
{% endblock data_markdown %}

{% block data_latex %}
.. math::

Expand Down
2 changes: 1 addition & 1 deletion nbconvert/utils/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class NbConvertBase(LoggingConfigurable):
Useful for display data priority that might be use by many transformers
"""

display_data_priority = List(['text/html', 'application/pdf', 'text/latex', 'image/svg+xml', 'image/png', 'image/jpeg', 'text/plain'],
display_data_priority = List(['text/html', 'application/pdf', 'text/latex', 'image/svg+xml', 'image/png', 'image/jpeg', 'text/markdown', 'text/plain'],
config=True,
help= """
An ordered list of preferred output type, the first
Expand Down

0 comments on commit eb5273f

Please sign in to comment.