mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
merge with 1.0
This commit is contained in:
commit
bafc3ee84d
5
CHANGES
5
CHANGES
@ -7,6 +7,11 @@ Release 1.1 (in development)
|
||||
Release 1.0.2 (in development)
|
||||
==============================
|
||||
|
||||
* #490: Fix cross-references to objects of types added by the
|
||||
:func:`~.Sphinx.add_object_type` API function.
|
||||
|
||||
* Fix handling of doc field types for different directive types.
|
||||
|
||||
* Allow breaking long signatures, continuing with backlash-escaped
|
||||
newlines.
|
||||
|
||||
|
@ -84,6 +84,9 @@ inserting them into the page source under a suitable :rst:dir:`py:module`,
|
||||
will document all non-private member functions and properties (that is,
|
||||
those whose name doesn't start with ``_``).
|
||||
|
||||
For modules, ``__all__`` will be respected when looking for members; the
|
||||
order of the members will also be the order in ``__all__``.
|
||||
|
||||
You can also give an explicit list of members; only these will then be
|
||||
documented::
|
||||
|
||||
|
@ -162,7 +162,6 @@ class ObjectDescription(Directive):
|
||||
self.env.temp_data['object'] = self.names[0]
|
||||
self.before_content()
|
||||
self.state.nested_parse(self.content, self.content_offset, contentnode)
|
||||
#self.handle_doc_fields(contentnode)
|
||||
DocFieldTransformer(self).transform_all(contentnode)
|
||||
self.env.temp_data['object'] = None
|
||||
self.after_content()
|
||||
|
@ -484,7 +484,13 @@ class StandardDomain(Domain):
|
||||
return make_refnode(builder, fromdocname, docname,
|
||||
labelid, contnode)
|
||||
else:
|
||||
docname, labelid = self.data['objects'].get((typ, target), ('', ''))
|
||||
objtypes = self.objtypes_for_role(typ) or []
|
||||
for objtype in objtypes:
|
||||
if (objtype, target) in self.data['objects']:
|
||||
docname, labelid = self.data['objects'][objtype, target]
|
||||
break
|
||||
else:
|
||||
docname, labelid = '', ''
|
||||
if not docname:
|
||||
if typ == 'term':
|
||||
env.warn(node.get('refdoc', fromdocname),
|
||||
|
@ -167,7 +167,7 @@ class DocFieldTransformer(object):
|
||||
|
||||
def __init__(self, directive):
|
||||
self.domain = directive.domain
|
||||
if not hasattr(directive, '_doc_field_type_map'):
|
||||
if '_doc_field_type_map' not in directive.__class__.__dict__:
|
||||
directive.__class__._doc_field_type_map = \
|
||||
self.preprocess_fieldtypes(directive.__class__.doc_field_types)
|
||||
self.typemap = directive._doc_field_type_map
|
||||
|
@ -83,6 +83,7 @@ def sphinx_smarty_pants(t):
|
||||
# Constants for quote education.
|
||||
|
||||
punct_class = r"""[!"#\$\%'()*+,-.\/:;<=>?\@\[\\\]\^_`{|}~]"""
|
||||
end_of_word_class = r"""[\s.,;:!?)]"""
|
||||
close_class = r"""[^\ \t\r\n\[\{\(\-]"""
|
||||
dec_dashes = r"""–|—"""
|
||||
|
||||
@ -117,8 +118,8 @@ opening_double_quotes_regex = re.compile(r"""
|
||||
closing_double_quotes_regex = re.compile(r"""
|
||||
#(%s)? # character that indicates the quote should be closing
|
||||
"
|
||||
(?=\s)
|
||||
""" % (close_class,), re.VERBOSE)
|
||||
(?=%s)
|
||||
""" % (close_class, end_of_word_class), re.VERBOSE)
|
||||
|
||||
closing_double_quotes_regex_2 = re.compile(r"""
|
||||
(%s) # character that indicates the quote should be closing
|
||||
|
@ -172,7 +172,7 @@ HTML_XPATH = {
|
||||
(".//a[@href='#mod.Cls'][@class='reference internal']", ''),
|
||||
(".//dl[@class='userdesc']", ''),
|
||||
(".//dt[@id='userdesc-myobj']", ''),
|
||||
(".//a[@href='#userdesc-myobj']", ''),
|
||||
(".//a[@href='#userdesc-myobj'][@class='reference internal']", ''),
|
||||
# C references
|
||||
(".//span[@class='pre']", 'CFunction()'),
|
||||
(".//a[@href='#Sphinx_DoSomething']", ''),
|
||||
|
Loading…
Reference in New Issue
Block a user