Skip to content
Permalink
Browse files

Fix some stuff

  • Loading branch information
ralsina committed May 5, 2017
1 parent 5adfa75 commit 3e4ad029b2418f2440e65cd27f006721ca75889f
Showing with 6 additions and 2 deletions.
  1. +2 −2 nikola/nikola.py
  2. +4 −0 tests/base.py
@@ -1694,14 +1694,14 @@ def apply_shortcodes(self, data, filename=None, lang=None, with_dependencies=Fal
lang = utils.LocaleBorg().current_lang
return shortcodes.apply_shortcodes(data, self.shortcode_registry, self, filename, lang=lang, with_dependencies=with_dependencies, extra_context=extra_context)

def apply_shortcodes_uuid(self, data, shortcodes, filename=None, lang=None, with_dependencies=False, extra_context=None):
def apply_shortcodes_uuid(self, data, _shortcodes, filename=None, lang=None, with_dependencies=False, extra_context=None):
"""Apply shortcodes from the registry on data."""
if lang is None:
lang = utils.LocaleBorg().current_lang
if extra_context is None:
extra_context = {}
deps = []
for k, v in shortcodes:
for k, v in _shortcodes.items():
replacement, _deps = shortcodes.apply_shortcodes(v, self.shortcode_registry, self, filename, lang=lang, with_dependencies=with_dependencies, extra_context=extra_context)
data.replace(k, replacement)
deps.extend(_deps)
@@ -230,3 +230,7 @@ def register_shortcode(self, name, f):
def apply_shortcodes(self, data, *a, **kw):
"""Apply shortcodes from the registry on data."""
return nikola.shortcodes.apply_shortcodes(data, self.shortcode_registry, **kw)

def apply_shortcodes_uuid(self, data, shortcodes, *a, **kw):
"""Apply shortcodes from the registry on data."""
return nikola.shortcodes.apply_shortcodes_uuid(data, shortcodes, self.shortcode_registry, **kw)

0 comments on commit 3e4ad02

Please sign in to comment.
You can’t perform that action at this time.