Permalink
Browse files

Pass post object and language to reST compiler (for shortcodes)

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information...
Kwpolska committed Mar 18, 2017
1 parent 1ec7e0f commit f0cd6c6f9ea6c05ef3f9eb783a139e62f48075b3
Showing with 2 additions and 1 deletion.
  1. +1 −0 CHANGES.txt
  2. +1 −1 nikola/plugins/compile/rest/__init__.py
@@ -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)
@@ -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:

0 comments on commit f0cd6c6

Please sign in to comment.