Skip to content

Commit 748c7d1

Browse files
committedAug 28, 2016
use underscore
1 parent 5bc1b45 commit 748c7d1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎nikola/plugins/compile/rest/listing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def run(self):
190190
self.content = fileobject.read().splitlines()
191191
self.state.document.settings.record_dependencies.add(fpath)
192192
target = urlunsplit(("link", 'listing', fpath.replace('\\', '/'), '', ''))
193-
src_target = urlunsplit(("link", 'listing-source', fpath.replace('\\', '/'), '', ''))
193+
src_target = urlunsplit(("link", 'listing_source', fpath.replace('\\', '/'), '', ''))
194194
src_label = self.site.MESSAGES('Source')
195195
generated_nodes = (
196196
[core.publish_doctree('`{0} <{1}>`_ `({2}) <{3}>`_' .format(

‎nikola/plugins/task/listings.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def register_output_name(self, input_folder, rel_name, rel_output_name):
5454
def set_site(self, site):
5555
"""Set Nikola site."""
5656
site.register_path_handler('listing', self.listing_path)
57-
site.register_path_handler('listing-source', self.listing_source_path)
57+
site.register_path_handler('listing_source', self.listing_source_path)
5858

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

@@ -263,9 +263,9 @@ def listing_source_path(self, name, lang):
263263
264264
Example:
265265
266-
link://listing-source/hello.py => /listings/tutorial/hello.py
266+
link://listing_source/hello.py => /listings/tutorial/hello.py
267267
268-
link://listing-source/tutorial/hello.py => /listings/tutorial/hello.py
268+
link://listing_source/tutorial/hello.py => /listings/tutorial/hello.py
269269
"""
270270
result = self.listing_path(name, lang)
271271
if result[-1].endswith('.html'):

0 commit comments

Comments
 (0)
Please sign in to comment.