##// END OF EJS Templates
Revert "Removed Javascript from Markdown by adding display priority to def config."...
Jonathan Frederic -
Show More
@@ -1,49 +1,43 b''
1 """Markdown Exporter class"""
1 """Markdown Exporter class"""
2
2
3 #-----------------------------------------------------------------------------
3 #-----------------------------------------------------------------------------
4 # Copyright (c) 2013, the IPython Development Team.
4 # Copyright (c) 2013, the IPython Development Team.
5 #
5 #
6 # Distributed under the terms of the Modified BSD License.
6 # Distributed under the terms of the Modified BSD License.
7 #
7 #
8 # The full license is in the file COPYING.txt, distributed with this software.
8 # The full license is in the file COPYING.txt, distributed with this software.
9 #-----------------------------------------------------------------------------
9 #-----------------------------------------------------------------------------
10
10
11 #-----------------------------------------------------------------------------
11 #-----------------------------------------------------------------------------
12 # Imports
12 # Imports
13 #-----------------------------------------------------------------------------
13 #-----------------------------------------------------------------------------
14
14
15 from IPython.config import Config
15 from IPython.config import Config
16
16
17 from .templateexporter import TemplateExporter
17 from .templateexporter import TemplateExporter
18
18
19 #-----------------------------------------------------------------------------
19 #-----------------------------------------------------------------------------
20 # Classes
20 # Classes
21 #-----------------------------------------------------------------------------
21 #-----------------------------------------------------------------------------
22
22
23 class MarkdownExporter(TemplateExporter):
23 class MarkdownExporter(TemplateExporter):
24 """
24 """
25 Exports to a markdown document (.md)
25 Exports to a markdown document (.md)
26 """
26 """
27
27
28 def _file_extension_default(self):
28 def _file_extension_default(self):
29 return 'md'
29 return 'md'
30
30
31 def _template_file_default(self):
31 def _template_file_default(self):
32 return 'markdown'
32 return 'markdown'
33
33
34 output_mimetype = 'text/markdown'
34 output_mimetype = 'text/markdown'
35
35
36 def _raw_mimetypes_default(self):
36 def _raw_mimetypes_default(self):
37 return ['text/markdown', 'text/html', '']
37 return ['text/markdown', 'text/html', '']
38
38
39 @property
39 @property
40 def default_config(self):
40 def default_config(self):
41 c = Config({
41 c = Config({'ExtractOutputPreprocessor':{'enabled':True}})
42 'NbConvertBase': {
43 'display_data_priority': ['html', 'application/pdf', 'svg', 'latex', 'png', 'jpg', 'jpeg' , 'text']
44 },
45 'ExtractOutputPreprocessor': {
46 'enabled':True}
47 })
48 c.merge(super(MarkdownExporter,self).default_config)
42 c.merge(super(MarkdownExporter,self).default_config)
49 return c
43 return c
General Comments 0
You need to be logged in to leave comments. Login now