mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Harmonise references to Sphinx versions (#11361)
This commit is contained in:
parent
8dd44d1e13
commit
616ba29f28
@ -1119,8 +1119,9 @@ class Sphinx:
|
||||
|
||||
.. versionadded:: 0.6
|
||||
.. versionchanged:: 2.1
|
||||
Take a lexer class as an argument. An instance of lexers are
|
||||
still supported until Sphinx-3.x.
|
||||
Take a lexer class as an argument.
|
||||
.. versionchanged:: 4.0
|
||||
Removed support for lexer instances as an argument.
|
||||
"""
|
||||
logger.debug('[app] adding lexer: %r', (alias, lexer))
|
||||
lexer_classes[alias] = lexer
|
||||
|
@ -1368,7 +1368,7 @@ class PythonDomain(Domain):
|
||||
type, searchmode)
|
||||
|
||||
if not matches and type == 'attr':
|
||||
# fallback to meth (for property; Sphinx-2.4.x)
|
||||
# fallback to meth (for property; Sphinx 2.4.x)
|
||||
# this ensures that `:attr:` role continues to refer to the old property entry
|
||||
# that defined by ``method`` directive in old reST files.
|
||||
matches = self.find_obj(env, modname, clsname, target, 'meth', searchmode)
|
||||
|
@ -360,10 +360,10 @@ def _resolve_reference_in_domain(env: BuildEnvironment,
|
||||
) -> nodes.reference | None:
|
||||
# we adjust the object types for backwards compatibility
|
||||
if domain.name == 'std' and 'cmdoption' in objtypes:
|
||||
# until Sphinx-1.6, cmdoptions are stored as std:option
|
||||
# cmdoptions were stored as std:option until Sphinx 1.6
|
||||
objtypes.append('option')
|
||||
if domain.name == 'py' and 'attribute' in objtypes:
|
||||
# Since Sphinx-2.1, properties are stored as py:method
|
||||
# properties are stored as py:method since Sphinx 2.1
|
||||
objtypes.append('method')
|
||||
|
||||
# the inventory contains domain:type as objtype
|
||||
|
Loading…
Reference in New Issue
Block a user