Skip to content
Permalink
Browse files

use underscore

  • Loading branch information
ralsina committed Aug 28, 2016
1 parent 5bc1b45 commit 748c7d125d3734f485d4fdf53c40cc0ecca5a559
Showing with 4 additions and 4 deletions.
  1. +1 −1 nikola/plugins/compile/rest/listing.py
  2. +3 −3 nikola/plugins/task/listings.py
@@ -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(
@@ -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.

@@ -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'):

0 comments on commit 748c7d1

Please sign in to comment.