Show More
@@ -1,16 +1,7 b'' | |||
|
1 | 1 | """HTML Exporter class""" |
|
2 | 2 | |
|
3 | #----------------------------------------------------------------------------- | |
|
4 | # Copyright (c) 2013, the IPython Development Team. | |
|
5 | # | |
|
3 | # Copyright (c) IPython Development Team. | |
|
6 | 4 | # Distributed under the terms of the Modified BSD License. |
|
7 | # | |
|
8 | # The full license is in the file COPYING.txt, distributed with this software. | |
|
9 | #----------------------------------------------------------------------------- | |
|
10 | ||
|
11 | #----------------------------------------------------------------------------- | |
|
12 | # Imports | |
|
13 | #----------------------------------------------------------------------------- | |
|
14 | 5 | |
|
15 | 6 | import os |
|
16 | 7 | |
@@ -46,7 +37,7 b' class HTMLExporter(TemplateExporter):' | |||
|
46 | 37 | def default_config(self): |
|
47 | 38 | c = Config({ |
|
48 | 39 | 'NbConvertBase': { |
|
49 | 'display_data_priority' : ['text/javascript', 'text/html', 'application/pdf', 'image/svg+xml', 'text/latex', 'image/png', 'image/jpeg', 'text/plain'] | |
|
40 | 'display_data_priority' : ['text/javascript', 'text/html', 'text/markdown', 'application/pdf', 'image/svg+xml', 'text/latex', 'image/png', 'image/jpeg', 'text/plain'] | |
|
50 | 41 | }, |
|
51 | 42 | 'CSSHTMLHeaderPreprocessor':{ |
|
52 | 43 | 'enabled':True |
@@ -123,6 +123,12 b' unknown type {{ cell.type }}' | |||
|
123 | 123 | </div> |
|
124 | 124 | {%- endblock data_html %} |
|
125 | 125 | |
|
126 | {% block data_markdown scoped -%} | |
|
127 | <div class="output_markdown rendered_html output_subarea {{extra_class}}"> | |
|
128 | {{ output.data['text/markdown'] | markdown2html }} | |
|
129 | </div> | |
|
130 | {%- endblock data_markdown %} | |
|
131 | ||
|
126 | 132 | {% block data_png scoped %} |
|
127 | 133 | <div class="output_png output_subarea {{extra_class}}"> |
|
128 | 134 | {%- if 'image/png' in output.metadata.get('filenames', {}) %} |
@@ -21,6 +21,9 b'' | |||
|
21 | 21 | ((*- elif type == 'text/html' -*)) |
|
22 | 22 | ((*- block data_html -*)) |
|
23 | 23 | ((*- endblock -*)) |
|
24 | ((*- elif type == 'text/markdown' -*)) | |
|
25 | ((*- block data_markdown -*)) | |
|
26 | ((*- endblock -*)) | |
|
24 | 27 | ((*- elif type == 'image/jpeg' -*)) |
|
25 | 28 | ((*- block data_jpg -*)) |
|
26 | 29 | ((*- endblock -*)) |
@@ -50,6 +50,10 b'' | |||
|
50 | 50 | {{ output.data['text/html'] }} |
|
51 | 51 | {% endblock data_html %} |
|
52 | 52 | |
|
53 | {% block data_markdown scoped %} | |
|
54 | {{ output.data['text/markdown'] }} | |
|
55 | {% endblock data_markdown %} | |
|
56 | ||
|
53 | 57 | {% block data_text scoped %} |
|
54 | 58 | {{ output.data['text/plain'] | indent }} |
|
55 | 59 | {% endblock data_text %} |
General Comments 0
You need to be logged in to leave comments.
Login now