Skip to content

Commit

Permalink
Pass post object and language to reST compiler (for shortcodes)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Mar 18, 2017
1 parent 1ec7e0f commit f0cd6c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.txt
Expand Up @@ -27,6 +27,7 @@ Features
Bugfixes
--------

* Pass post object and language to reST compiler (for shortcodes)
* Fix crashes when rendering subcategories (Issue #2681)
* Prevent writing cache files outside of the cache folder
(Issue #2684)
Expand Down
2 changes: 1 addition & 1 deletion nikola/plugins/compile/rest/__init__.py
Expand Up @@ -103,7 +103,7 @@ def compile(self, source, dest, is_two_file=True, post=None, lang=None):
with io.open(dest, "w+", encoding="utf8") as out_file:
with io.open(source, "r", encoding="utf8") as in_file:
data = in_file.read()
output, error_level, deps, shortcode_deps = self.compile_string(data, source, is_two_file)
output, error_level, deps, shortcode_deps = self.compile_string(data, source, is_two_file, post, lang)
out_file.write(output)
if post is None:
if deps.list:
Expand Down

0 comments on commit f0cd6c6

Please sign in to comment.