Sphinx 1.0.2 class for docutils' "contents" directive is external instead of internal

tpowers avatartpowers created an issue

Using the docutils' "contents" directive (http://docutils.sourceforge.net/docs/ref/rst/directives.html#table-of-contents):

  .. contents::

results in a TOC that has hyperlinks of the form:

  <a href="blah" class="reference external">blah</a>

instead of the correct:

  <a href="blah" class="reference internal">blah</a>

since obviously these references to links on the same page are "internal".

I haven't had the time yet to figure out how to fix the code, but a workaround is to add the following to your css:

  a, a:visited
      text-decoration: none;
      border-bottom: none;

  a:hover {
      text-decoration: underline;
      border-bottom: none;

where you can, of course, use whatever hyperlink style you want.

Fixing this bug, along with #494 "Sphinx 1.0.2 toctree maxdepth argument doesn't work" lets authors limit the depth of their sidebar globaltoc, and decide when to supplement it with pages that have local TOCs in them.

Comments (6)

  1. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.