Skip to content

Commit

Permalink
use underscore
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed Aug 28, 2016
1 parent 5bc1b45 commit 748c7d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion nikola/plugins/compile/rest/listing.py
Expand Up @@ -190,7 +190,7 @@ def run(self):
self.content = fileobject.read().splitlines()
self.state.document.settings.record_dependencies.add(fpath)
target = urlunsplit(("link", 'listing', fpath.replace('\\', '/'), '', ''))
src_target = urlunsplit(("link", 'listing-source', fpath.replace('\\', '/'), '', ''))
src_target = urlunsplit(("link", 'listing_source', fpath.replace('\\', '/'), '', ''))
src_label = self.site.MESSAGES('Source')
generated_nodes = (
[core.publish_doctree('`{0} <{1}>`_ `({2}) <{3}>`_' .format(
Expand Down
6 changes: 3 additions & 3 deletions nikola/plugins/task/listings.py
Expand Up @@ -54,7 +54,7 @@ def register_output_name(self, input_folder, rel_name, rel_output_name):
def set_site(self, site):
"""Set Nikola site."""
site.register_path_handler('listing', self.listing_path)
site.register_path_handler('listing-source', self.listing_source_path)
site.register_path_handler('listing_source', self.listing_source_path)

# We need to prepare some things for the listings path handler to work.

Expand Down Expand Up @@ -263,9 +263,9 @@ def listing_source_path(self, name, lang):
Example:
link://listing-source/hello.py => /listings/tutorial/hello.py
link://listing_source/hello.py => /listings/tutorial/hello.py
link://listing-source/tutorial/hello.py => /listings/tutorial/hello.py
link://listing_source/tutorial/hello.py => /listings/tutorial/hello.py
"""
result = self.listing_path(name, lang)
if result[-1].endswith('.html'):
Expand Down

0 comments on commit 748c7d1

Please sign in to comment.