From 59e6ec92ebf6f5221a3e82d0ac8b239373ad356b 2015-03-01 22:59:02 From: Matthias Bussonnier Date: 2015-03-01 22:59:02 Subject: [PATCH] add blank lines in RST to separates blocks. otherwise it is miss parsed. fixes #7907 --- diff --git a/IPython/nbconvert/templates/rst.tpl b/IPython/nbconvert/templates/rst.tpl index 526078b..aaca417 100644 --- a/IPython/nbconvert/templates/rst.tpl +++ b/IPython/nbconvert/templates/rst.tpl @@ -12,7 +12,7 @@ .. code:: python {{ cell.source | indent}} -{%- endif -%} +{% endif -%} {% endblock input %} {% block error %} @@ -71,6 +71,12 @@ {{ cell.source | markdown2rst }} {% endblock markdowncell %} +{%- block rawcell scoped -%} +{%- if cell.metadata.get('raw_mimetype', '').lower() in resources.get('raw_mimetypes', ['']) %} +{{cell.source}} +{% endif -%} +{%- endblock rawcell -%} + {% block headingcell scoped %} {{ ("#" * cell.level + cell.source) | replace('\n', ' ') | markdown2rst }} {% endblock headingcell %}