Skip to content

Commit

Permalink
Merge branch 'master' into fix-2205
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed Jan 4, 2016
2 parents c84e558 + 7803f7a commit aaa8cb7
Show file tree
Hide file tree
Showing 4 changed files with 309 additions and 142 deletions.
4 changes: 2 additions & 2 deletions nikola/nikola.py
Expand Up @@ -1318,9 +1318,9 @@ def register_shortcode(self, name, f):
return
self.shortcode_registry[name] = f

def apply_shortcodes(self, data):
def apply_shortcodes(self, data, filename=None):
"""Apply shortcodes from the registry on data."""
return shortcodes.apply_shortcodes(data, self.shortcode_registry)
return shortcodes.apply_shortcodes(data, self.shortcode_registry, self, filename)

def generic_rss_renderer(self, lang, title, link, description, timeline, output_path,
rss_teasers, rss_plain, feed_length=10, feed_url=None,
Expand Down
2 changes: 1 addition & 1 deletion nikola/plugins/compile/markdown/__init__.py
Expand Up @@ -76,7 +76,7 @@ def compile_html(self, source, dest, is_two_file=True):
if not is_two_file:
_, data = self.split_metadata(data)
output = markdown(data, self.extensions)
output = apply_shortcodes(output, self.site.shortcode_registry, self.site)
output = apply_shortcodes(output, self.site.shortcode_registry, self.site, source)
out_file.write(output)

def create_post(self, path, **kw):
Expand Down

0 comments on commit aaa8cb7

Please sign in to comment.