Show More
@@ -62,7 +62,7 b' class Exporter(LoggingConfigurable):' | |||||
62 | preprocessors = List(config=True, |
|
62 | preprocessors = List(config=True, | |
63 | help="""List of preprocessors, by name or namespace, to enable.""") |
|
63 | help="""List of preprocessors, by name or namespace, to enable.""") | |
64 |
|
64 | |||
65 |
_preprocessors = |
|
65 | _preprocessors = List() | |
66 |
|
66 | |||
67 | default_preprocessors = List(['IPython.nbconvert.preprocessors.coalesce_streams', |
|
67 | default_preprocessors = List(['IPython.nbconvert.preprocessors.coalesce_streams', | |
68 | 'IPython.nbconvert.preprocessors.SVG2PDFPreprocessor', |
|
68 | 'IPython.nbconvert.preprocessors.SVG2PDFPreprocessor', | |
@@ -215,18 +215,15 b' class Exporter(LoggingConfigurable):' | |||||
215 | Register all of the preprocessors needed for this exporter, disabled |
|
215 | Register all of the preprocessors needed for this exporter, disabled | |
216 | unless specified explicitly. |
|
216 | unless specified explicitly. | |
217 | """ |
|
217 | """ | |
218 |
|
|
218 | self._preprocessors = [] | |
219 | self._preprocessors = [] |
|
219 | ||
220 |
|
220 | # Load default preprocessors (not necessarly enabled by default). | ||
221 | #Load default preprocessors (not necessarly enabled by default). |
|
221 | for preprocessor in self.default_preprocessors: | |
222 |
|
|
222 | self.register_preprocessor(preprocessor) | |
223 | for preprocessor in self.default_preprocessors: |
|
223 | ||
224 | self.register_preprocessor(preprocessor) |
|
224 | # Load user-specified preprocessors. Enable by default. | |
225 |
|
225 | for preprocessor in self.preprocessors: | ||
226 | #Load user preprocessors. Enable by default. |
|
226 | self.register_preprocessor(preprocessor, enabled=True) | |
227 | if self.preprocessors: |
|
|||
228 | for preprocessor in self.preprocessors: |
|
|||
229 | self.register_preprocessor(preprocessor, enabled=True) |
|
|||
230 |
|
227 | |||
231 |
|
228 | |||
232 | def _init_resources(self, resources): |
|
229 | def _init_resources(self, resources): |
@@ -153,7 +153,6 b' class TemplateExporter(Exporter):' | |||||
153 | #Init |
|
153 | #Init | |
154 | self._init_template() |
|
154 | self._init_template() | |
155 | self._init_environment(extra_loaders=extra_loaders) |
|
155 | self._init_environment(extra_loaders=extra_loaders) | |
156 | self._init_preprocessors() |
|
|||
157 | self._init_filters() |
|
156 | self._init_filters() | |
158 |
|
157 | |||
159 |
|
158 |
General Comments 0
You need to be logged in to leave comments.
Login now