Skip to content

Commit

Permalink
rst2html: merge source_path and l_source parameters. Fixes getnikola#…
Browse files Browse the repository at this point in the history
  • Loading branch information
aurelien-naldi committed Aug 8, 2014
1 parent 2c9c3ea commit 558c240
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,4 @@ wimpr1m <https://github.com/wimpr1m>
yarko <https://github.com/yarko>
Alex Walters <https://github.com/tritium21>
Carsten Grohmann <https://github.com/CarstenGrohmann>
Aurelien Naldi <https://github.com/aurelien-naldi>
6 changes: 3 additions & 3 deletions nikola/plugins/compile/rest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def compile_html(self, source, dest, is_two_file=True):
'syntax_highlight': 'short',
'math_output': 'mathjax',
'template': default_template_path,
}, logger=self.logger, l_source=source, l_add_ln=add_ln)
}, logger=self.logger, source_path=source, l_add_ln=add_ln)
out_file.write(output)
deps_path = dest + '.dep'
if deps.list:
Expand Down Expand Up @@ -213,7 +213,7 @@ def rst2html(source, source_path=None, source_class=docutils.io.StringInput,
parser=None, parser_name='restructuredtext', writer=None,
writer_name='html', settings=None, settings_spec=None,
settings_overrides=None, config_section=None,
enable_exit_status=None, logger=None, l_source='', l_add_ln=0):
enable_exit_status=None, logger=None, l_add_ln=0):
"""
Set up & run a `Publisher`, and return a dictionary of document parts.
Dictionary keys are the names of parts, and values are Unicode strings;
Expand All @@ -237,7 +237,7 @@ def rst2html(source, source_path=None, source_class=docutils.io.StringInput,
# logger a logger from Nikola
# source source filename (docutils gets a string)
# add_ln amount of metadata lines (see comment in compile_html above)
reader.l_settings = {'logger': logger, 'source': l_source,
reader.l_settings = {'logger': logger, 'source': source_path,
'add_ln': l_add_ln}

pub = docutils.core.Publisher(reader, parser, writer, settings=settings,
Expand Down

0 comments on commit 558c240

Please sign in to comment.