From 5b4caf86a70af4cef4073d36843e6b11ca1c20f4 2015-03-19 21:42:54 From: Min RK Date: 2015-03-19 21:42:54 Subject: [PATCH] fix javascript mime-type in HTML exporter It's application/javascript, not text/javascript. The result was javascript output never showing up in nbconvert. --- diff --git a/IPython/nbconvert/exporters/html.py b/IPython/nbconvert/exporters/html.py index 1948709..f306cad 100644 --- a/IPython/nbconvert/exporters/html.py +++ b/IPython/nbconvert/exporters/html.py @@ -37,7 +37,7 @@ class HTMLExporter(TemplateExporter): def default_config(self): c = Config({ 'NbConvertBase': { - 'display_data_priority' : ['text/javascript', 'text/html', 'text/markdown', 'application/pdf', 'image/svg+xml', 'text/latex', 'image/png', 'image/jpeg', 'text/plain'] + 'display_data_priority' : ['application/javascript', 'text/html', 'text/markdown', 'application/pdf', 'image/svg+xml', 'text/latex', 'image/png', 'image/jpeg', 'text/plain'] }, 'CSSHTMLHeaderPreprocessor':{ 'enabled':True diff --git a/IPython/nbconvert/templates/html/basic.tpl b/IPython/nbconvert/templates/html/basic.tpl index b23d1a1..2da6292 100644 --- a/IPython/nbconvert/templates/html/basic.tpl +++ b/IPython/nbconvert/templates/html/basic.tpl @@ -192,7 +192,7 @@ height={{output.metadata['image/jpeg']['height']}} {%- block data_javascript scoped %}
{%- endblock -%}