From 5af2ff3c81de1e5a256bc884146dd4cf543de2dc Mon Sep 17 00:00:00 2001 From: Jake Vanderplas Date: Sat, 1 Jun 2013 10:32:15 -0700 Subject: [PATCH] make compatible with newer IPython --- liquid_tags/include_code.py | 2 ++ liquid_tags/notebook.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/liquid_tags/include_code.py b/liquid_tags/include_code.py index 185c882..f8572ca 100644 --- a/liquid_tags/include_code.py +++ b/liquid_tags/include_code.py @@ -70,7 +70,9 @@ def include_code(preprocessor, tag, markup): title = os.path.basename(src) static_dir = settings.get('STATIC_OUT_DIR', 'static') + url = '/{0}/{1}/{2}'.format(static_dir, code_dir, src) + url = re.sub('/+', '/', url) open_tag = ("
\n
{title} " "download
".format(title=title, diff --git a/liquid_tags/notebook.py b/liquid_tags/notebook.py index 27b4763..c5d3f11 100644 --- a/liquid_tags/notebook.py +++ b/liquid_tags/notebook.py @@ -179,7 +179,7 @@ def notebook(preprocessor, tag, markup): raise ValueError("File {0} could not be found".format(nb_path)) # Call the notebook converter - converter = ConverterBloggerHTML(nb_path) + converter = ConverterBloggerHTML(infile=nb_path) converter.read() header_lines = process_header(converter.header_body())