Skip to content
Permalink
Browse files

Pass post to compile_string in markdown compiler

cc @felixfontein

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jan 8, 2017
1 parent 80abb4a commit 5c5355b1e93dcb09eb04dc81b7262807ec3f70f4
Showing with 2 additions and 2 deletions.
  1. +2 −2 nikola/plugins/compile/markdown/__init__.py
@@ -63,7 +63,7 @@ def set_site(self, site):

self.config_dependencies.append(str(sorted(site.config.get("MARKDOWN_EXTENSIONS"))))

def compile_string(self, content, source_path=None, is_two_file=True):
def compile_string(self, content, source_path=None, is_two_file=True, post=None):
"""Compile Markdown into HTML strings."""
if markdown is None:
req_missing(['markdown'], 'build this site (compile Markdown)')
@@ -82,7 +82,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, shortcode_deps = self.compile_string(data, source, is_two_file)
output, shortcode_deps = self.compile_string(data, source, is_two_file, post)
out_file.write(output)
if post is None:
if shortcode_deps:

0 comments on commit 5c5355b

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