diff options
| author | Georg Brandl <georg@python.org> | 2009-02-07 13:32:47 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2009-02-07 13:32:47 +0100 |
| commit | 63617c4daa54abf96305e7afdf75972ffd299713 (patch) | |
| tree | 0d37c4fb857ad1f9ebf12f7036a98f45abdcff80 /sphinx/directives | |
| parent | bf4d90563e103101a751dce1f28a7d5473da23cd (diff) | |
| download | sphinx-63617c4daa54abf96305e7afdf75972ffd299713.tar.gz | |
Patch from Stefan Seefeld: make local toctree collapsible.
Diffstat (limited to 'sphinx/directives')
| -rw-r--r-- | sphinx/directives/other.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/directives/other.py b/sphinx/directives/other.py index a7cdd904..ab98ee61 100644 --- a/sphinx/directives/other.py +++ b/sphinx/directives/other.py @@ -14,7 +14,7 @@ from docutils.parsers.rst import directives from sphinx import addnodes from sphinx.locale import pairindextypes -from sphinx.util import patfilter, ws_re, caption_ref_re, docname_join +from sphinx.util import patfilter, ws_re, caption_ref_re, url_re, docname_join from sphinx.util.compat import make_admonition @@ -53,7 +53,7 @@ def toctree_directive(name, arguments, options, content, lineno, docname = docname[:-len(suffix)] # absolutize filenames docname = docname_join(env.docname, docname) - if ref.startswith('http://'): # FIXME: generalize to arbitrary xrefs + if url_re.match(ref): entries.append((title, ref)) elif docname not in env.found_docs: ret.append(state.document.reporter.warning( |
