Skip to content

Commit f0cd6c6

Browse files
committedMar 18, 2017
Pass post object and language to reST compiler (for shortcodes)
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
1 parent 1ec7e0f commit f0cd6c6

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
 

‎CHANGES.txt

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Features
2727
Bugfixes
2828
--------
2929

30+
* Pass post object and language to reST compiler (for shortcodes)
3031
* Fix crashes when rendering subcategories (Issue #2681)
3132
* Prevent writing cache files outside of the cache folder
3233
(Issue #2684)

‎nikola/plugins/compile/rest/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def compile(self, source, dest, is_two_file=True, post=None, lang=None):
103103
with io.open(dest, "w+", encoding="utf8") as out_file:
104104
with io.open(source, "r", encoding="utf8") as in_file:
105105
data = in_file.read()
106-
output, error_level, deps, shortcode_deps = self.compile_string(data, source, is_two_file)
106+
output, error_level, deps, shortcode_deps = self.compile_string(data, source, is_two_file, post, lang)
107107
out_file.write(output)
108108
if post is None:
109109
if deps.list:

0 commit comments

Comments
 (0)
Please sign in to comment.