Sfoglia il codice sorgente

Change names for compatibility with IPython 1.0alpha

Jake Vanderplas 11 anni fa
parent
commit
499ee9890a
1 ha cambiato i file con 6 aggiunte e 5 eliminazioni
  1. 6 5
      liquid_tags/notebook.py

+ 6 - 5
liquid_tags/notebook.py

@@ -56,7 +56,7 @@ except ImportError:
 from IPython.nbconvert.filters.highlight import _pygment_highlight
 from pygments.formatters import HtmlFormatter
 
-from IPython.nbconvert.exporters import BasicHTMLExporter
+from IPython.nbconvert.exporters import HTMLExporter
 from IPython.config import Config
 
 from IPython.nbformat import current as nbformat
@@ -252,10 +252,11 @@ def notebook(preprocessor, tag, markup):
                 'SubCell':
                     {'enabled':True, 'start':start, 'end':end}})
 
-    exporter = BasicHTMLExporter(config=c,
-                                 filters={'highlight': custom_highlighter},
-                                 transformers=[SubCell],
-                                 extra_loaders=[pelican_loader])
+    exporter = HTMLExporter(config=c,
+                            template_file='basic',
+                            filters={'highlight2html': custom_highlighter},
+                            transformers=[SubCell],
+                            extra_loaders=[pelican_loader])
 
     # read and parse the notebook
     with open(nb_path) as f: