mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
merge with trunk
This commit is contained in:
commit
722f9ac329
10
CHANGES
10
CHANGES
@ -123,6 +123,16 @@ Release 1.0 (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
|
||||
TOC for the ``toctree()`` template function.
|
||||
|
||||
|
@ -151,7 +151,8 @@ General configuration
|
||||
:confval:`language`), relative to the source directory. The directories on
|
||||
this path are searched by the standard :mod:`gettext` module for a text
|
||||
domain of ``sphinx``; so if you add the directory :file:`./locale` to this
|
||||
settting, the message catalogs must be in
|
||||
settting, the message catalogs (compiled from ``.po`` format using
|
||||
:program:`msgfmt`) must be in
|
||||
:file:`./locale/{language}/LC_MESSAGES/sphinx.mo`.
|
||||
|
||||
The default is ``[]``.
|
||||
|
@ -201,7 +201,7 @@ The ``todo`` directive function looks like this::
|
||||
def run(self):
|
||||
env = self.state.document.settings.env
|
||||
|
||||
targetid = "todo-%s" % env.new_serialno('todo')
|
||||
targetid = "todo-%d" % env.new_serialno('todo')
|
||||
targetnode = nodes.target('', '', ids=[targetid])
|
||||
|
||||
ad = make_admonition(todo, self.name, [_('Todo')], self.options,
|
||||
|
@ -841,7 +841,10 @@ class FunctionDocumenter(ModuleLevelDocumenter):
|
||||
argspec = inspect.getargspec(self.object.__init__)
|
||||
if argspec[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):
|
||||
pass
|
||||
|
@ -196,6 +196,8 @@ class DocTestBuilder(Builder):
|
||||
# that code nevertheless, we monkey-patch the "compile" it uses.
|
||||
doctest.compile = self.compile
|
||||
|
||||
sys.path[0:0] = self.config.doctest_path
|
||||
|
||||
self.type = 'single'
|
||||
|
||||
self.total_failures = 0
|
||||
@ -246,8 +248,6 @@ Doctest summary
|
||||
if self.total_failures or self.setup_failures:
|
||||
self.app.statuscode = 1
|
||||
|
||||
sys.path[0:0] = self.config.doctest_path
|
||||
|
||||
def write(self, build_docnames, updated_docnames, method='update'):
|
||||
if build_docnames is None:
|
||||
build_docnames = sorted(self.env.all_docs)
|
||||
|
@ -444,7 +444,8 @@
|
||||
% Include hyperref last.
|
||||
\RequirePackage[colorlinks,breaklinks,
|
||||
linkcolor=InnerLinkColor,filecolor=OuterLinkColor,
|
||||
menucolor=OuterLinkColor,urlcolor=OuterLinkColor]{hyperref}
|
||||
menucolor=OuterLinkColor,urlcolor=OuterLinkColor,
|
||||
citecolor=InnerLinkColor]{hyperref}
|
||||
|
||||
% From docutils.writers.latex2e
|
||||
\providecommand{\DUspan}[2]{%
|
||||
|
@ -15,6 +15,8 @@
|
||||
{%- set reldelim2 = reldelim2 is not defined and ' |' or reldelim2 %}
|
||||
{%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and
|
||||
(not sidebars == []) %}
|
||||
{%- set url_root = pathto('', 1) %}
|
||||
{%- if url_root == '#' %}{% set url_root = '' %}{% endif %}
|
||||
|
||||
{%- macro relbar() %}
|
||||
<div class="related">
|
||||
@ -96,7 +98,7 @@
|
||||
{%- if not embedded %}
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '{{ pathto("", 1) }}',
|
||||
URL_ROOT: '{{ url_root }}',
|
||||
VERSION: '{{ release|e }}',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '{{ file_suffix }}',
|
||||
|
@ -465,7 +465,8 @@ var Search = {
|
||||
displayNextItem();
|
||||
});
|
||||
} 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));
|
||||
Search.output.append(listItem);
|
||||
listItem.slideDown(5, function() {
|
||||
|
@ -740,10 +740,10 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
pass
|
||||
|
||||
def visit_term(self, node):
|
||||
ctx = '] \\leavevmode'
|
||||
ctx = '}] \\leavevmode'
|
||||
if node.has_key('ids') and node['ids']:
|
||||
ctx += self.hypertarget(node['ids'][0])
|
||||
self.body.append('\\item[')
|
||||
self.body.append('\\item[{')
|
||||
self.context.append(ctx)
|
||||
def depart_term(self, node):
|
||||
self.body.append(self.context.pop())
|
||||
|
Loading…
Reference in New Issue
Block a user