]> granicus.if.org Git - python/commitdiff
[3.5] Fix broken `Show Source` links on documentation pages (GH-3113) (#3126)
authorMariatta <Mariatta@users.noreply.github.com>
Fri, 8 Sep 2017 18:32:26 +0000 (11:32 -0700)
committerNed Deily <nad@python.org>
Fri, 8 Sep 2017 18:32:26 +0000 (11:32 -0700)
The `Show Source` was broken because of a change made in sphinx 1.5.1
In Sphinx 1.4.9, the sourcename was "index.txt".
In Sphinx 1.5.1+, it is now "index.rst.txt".
(cherry picked from commit b9ff498793611d1c6a9b99df464812931a1e2d69)

Doc/tools/templates/customsourcelink.html

index 71d0bba683074e3610300ea6487904d89b3ee895..21af621efce95b15a6e7b092201ad1b7ce79a3c4 100644 (file)
@@ -4,7 +4,7 @@
     <ul class="this-page-menu">
       <li><a href="{{ pathto('bugs') }}">{% trans %}Report a Bug{% endtrans %}</a></li>
       <li>
-        <a href="https://github.com/python/cpython/blob/{{ version }}/Doc/{{ sourcename|replace('txt', 'rst') }}"
+        <a href="https://github.com/python/cpython/blob/{{ version }}/Doc/{{ sourcename|replace('.rst.txt', '.rst') }}"
             rel="nofollow">{{ _('Show Source') }}
         </a>
       </li>