Skip to content

Commit

Permalink
Pass post to compile_string in markdown compiler
Browse files Browse the repository at this point in the history
cc @felixfontein

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jan 8, 2017
1 parent 80abb4a commit 5c5355b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nikola/plugins/compile/markdown/__init__.py
Expand Up @@ -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)')
Expand All @@ -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:
Expand Down

0 comments on commit 5c5355b

Please sign in to comment.