merge with 0.6

This commit is contained in:
Georg Brandl
2010-04-17 12:57:38 +02:00
8 changed files with 26 additions and 10 deletions

10
CHANGES
View File

@@ -89,6 +89,16 @@ Release 1.0 (in development)
Release 0.6.6 (in development) Release 0.6.6 (in development)
============================== ==============================
* #387: Fix the display of search results in ``dirhtml`` output.
* #376: In autodoc, fix display of parameter defaults containing
backslashes.
* #370: Fix handling of complex list item labels in LaTeX output.
* #374: Make the ``doctest_path`` config value of the doctest
extension actually work.
* Fix the handling of multiple toctrees when creating the global * Fix the handling of multiple toctrees when creating the global
TOC for the ``toctree()`` template function. TOC for the ``toctree()`` template function.

View File

@@ -149,8 +149,8 @@ General configuration
:confval:`language`), relative to the source directory. The directories on :confval:`language`), relative to the source directory. The directories on
this path are searched by the standard :mod:`gettext` module for a domain of this path are searched by the standard :mod:`gettext` module for a domain of
``sphinx``; so if you add the directory :file:`./locale` to this settting, ``sphinx``; so if you add the directory :file:`./locale` to this settting,
the message catalogs must be in the message catalogs (compiled from ``.po`` format using :program:`msgfmt`)
:file:`./locale/{language}/LC_MESSAGES/sphinx.mo`. must be in :file:`./locale/{language}/LC_MESSAGES/sphinx.mo`.
The default is ``[]``. The default is ``[]``.

View File

@@ -833,7 +833,10 @@ class FunctionDocumenter(ModuleLevelDocumenter):
argspec = inspect.getargspec(self.object.__init__) argspec = inspect.getargspec(self.object.__init__)
if argspec[0]: if argspec[0]:
del argspec[0][0] del argspec[0][0]
return inspect.formatargspec(*argspec) args = inspect.formatargspec(*argspec)
# escape backslashes for reST
args = args.replace('\\', '\\\\')
return args
def document_members(self, all_members=False): def document_members(self, all_members=False):
pass pass

View File

@@ -196,6 +196,8 @@ class DocTestBuilder(Builder):
# that code nevertheless, we monkey-patch the "compile" it uses. # that code nevertheless, we monkey-patch the "compile" it uses.
doctest.compile = self.compile doctest.compile = self.compile
sys.path[0:0] = self.config.doctest_path
self.type = 'single' self.type = 'single'
self.total_failures = 0 self.total_failures = 0
@@ -246,8 +248,6 @@ Doctest summary
if self.total_failures or self.setup_failures: if self.total_failures or self.setup_failures:
self.app.statuscode = 1 self.app.statuscode = 1
sys.path[0:0] = self.config.doctest_path
def write(self, build_docnames, updated_docnames, method='update'): def write(self, build_docnames, updated_docnames, method='update'):
if build_docnames is None: if build_docnames is None:
build_docnames = sorted(self.env.all_docs) build_docnames = sorted(self.env.all_docs)

View File

@@ -729,7 +729,7 @@
\RequirePackage[colorlinks,breaklinks, \RequirePackage[colorlinks,breaklinks,
linkcolor=InnerLinkColor,filecolor=OuterLinkColor, linkcolor=InnerLinkColor,filecolor=OuterLinkColor,
menucolor=OuterLinkColor,pagecolor=OuterLinkColor, menucolor=OuterLinkColor,pagecolor=OuterLinkColor,
urlcolor=OuterLinkColor]{hyperref} urlcolor=OuterLinkColor,citecolor=InnerLinkColor]{hyperref}
% From docutils.writers.latex2e % From docutils.writers.latex2e
\providecommand{\DUspan}[2]{% \providecommand{\DUspan}[2]{%

View File

@@ -15,6 +15,8 @@
{%- set reldelim2 = reldelim2 is not defined and ' |' or reldelim2 %} {%- set reldelim2 = reldelim2 is not defined and ' |' or reldelim2 %}
{%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and {%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and
(not sidebars == []) %} (not sidebars == []) %}
{%- set url_root = pathto('', 1) %}
{%- if url_root == '#' %}{% set url_root = '' %}{% endif %}
{%- macro relbar() %} {%- macro relbar() %}
<div class="related"> <div class="related">
@@ -96,7 +98,7 @@
{%- if not embedded %} {%- if not embedded %}
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT: '{{ pathto("", 1) }}', URL_ROOT: '{{ url_root }}',
VERSION: '{{ release|e }}', VERSION: '{{ release|e }}',
COLLAPSE_MODINDEX: false, COLLAPSE_MODINDEX: false,
FILE_SUFFIX: '{{ file_suffix }}', FILE_SUFFIX: '{{ file_suffix }}',

View File

@@ -453,7 +453,8 @@ var Search = {
displayNextItem(); displayNextItem();
}); });
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) { } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
$.get('_sources/' + item[0] + '.txt', function(data) { $.get(DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' +
item[0] + '.txt', function(data) {
listItem.append($.makeSearchSummary(data, searchterms, hlterms)); listItem.append($.makeSearchSummary(data, searchterms, hlterms));
Search.output.append(listItem); Search.output.append(listItem);
listItem.slideDown(5, function() { listItem.slideDown(5, function() {

View File

@@ -764,10 +764,10 @@ class LaTeXTranslator(nodes.NodeVisitor):
pass pass
def visit_term(self, node): def visit_term(self, node):
ctx = '] \\leavevmode' ctx = '}] \\leavevmode'
if node.has_key('ids') and node['ids']: if node.has_key('ids') and node['ids']:
ctx += '\\hypertarget{%s}{}' % self.idescape(node['ids'][0]) ctx += '\\hypertarget{%s}{}' % self.idescape(node['ids'][0])
self.body.append('\\item[') self.body.append('\\item[{')
self.context.append(ctx) self.context.append(ctx)
def depart_term(self, node): def depart_term(self, node):
self.body.append(self.context.pop()) self.body.append(self.context.pop())