Skip to content
Permalink
Browse files
Remove with_dependencies argument from apply_shortcodes calls
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jun 11, 2017
1 parent 78c7248 commit 426a1ecf4ed9cb75896ad82e320c1d69b0f951c7
@@ -48,7 +48,7 @@ def compile_string(self, data, source_path=None, is_two_file=True, post=None, la
if not is_two_file:
_, data = self.split_metadata(data)
new_data, shortcodes = sc.extract_shortcodes(data)
return self.site.apply_shortcodes_uuid(new_data, shortcodes, filename=source_path, with_dependencies=True, extra_context=dict(post=post))
return self.site.apply_shortcodes_uuid(new_data, shortcodes, filename=source_path, extra_context={'post': post})

def compile(self, source, dest, is_two_file=True, post=None, lang=None):
"""Compile the source file into HTML and save as dest."""
@@ -80,7 +80,7 @@ def compile_string(self, data, source_path=None, is_two_file=True, post=None, la
"""Compile notebooks into HTML strings."""
new_data, shortcodes = sc.extract_shortcodes(data)
output = self._compile_string(nbformat.reads(new_data, current_nbformat))
return self.site.apply_shortcodes_uuid(output, shortcodes, filename=source_path, with_dependencies=True, extra_context=dict(post=post))
return self.site.apply_shortcodes_uuid(output, shortcodes, filename=source_path, extra_context={'post': post})

def compile(self, source, dest, is_two_file=False, post=None, lang=None):
"""Compile the source file into HTML and save as dest."""
@@ -100,7 +100,7 @@ def compile_string(self, data, source_path=None, is_two_file=True, post=None, la
_, data = self.split_metadata(data)
new_data, shortcodes = sc.extract_shortcodes(data)
output, _ = self.converter.convert(new_data)
output, shortcode_deps = self.site.apply_shortcodes_uuid(output, shortcodes, filename=source_path, with_dependencies=True, extra_context=dict(post=post))
output, shortcode_deps = self.site.apply_shortcodes_uuid(output, shortcodes, filename=source_path, extra_context={'post': post})
return output, shortcode_deps

def compile(self, source, dest, is_two_file=True, post=None, lang=None):
@@ -132,7 +132,7 @@ def compile_string(self, data, source_path=None, is_two_file=True, post=None, la
# Original issue: empty files. `output` became a bytestring.
output = output.decode('utf-8')

output, shortcode_deps = self.site.apply_shortcodes_uuid(output, shortcodes, filename=source_path, with_dependencies=True, extra_context=dict(post=post))
output, shortcode_deps = self.site.apply_shortcodes_uuid(output, shortcodes, filename=source_path, extra_context={'post': post})
return output, error_level, deps, shortcode_deps

def compile(self, source, dest, is_two_file=True, post=None, lang=None):

0 comments on commit 426a1ec

Please sign in to comment.