mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #6999: napoleon: fails to parse tilde in :exc: role
This commit is contained in:
parent
ae8fc43024
commit
b14439ca48
1
CHANGES
1
CHANGES
@ -45,6 +45,7 @@ Bugs fixed
|
||||
* #6961: latex: warning for babel shown twice
|
||||
* #6559: Wrong node-ids are generated in glossary directive
|
||||
* #6986: apidoc: misdetects module name for .so file inside module
|
||||
* #6999: napoleon: fails to parse tilde in :exc: role
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
@ -101,8 +101,8 @@ class GoogleDocstring:
|
||||
|
||||
"""
|
||||
|
||||
_name_rgx = re.compile(r"^\s*((?::(?P<role>\S+):)?`(?P<name>[a-zA-Z0-9_.-]+)`|"
|
||||
r" (?P<name2>[a-zA-Z0-9_.-]+))\s*", re.X)
|
||||
_name_rgx = re.compile(r"^\s*((?::(?P<role>\S+):)?`(?P<name>~?[a-zA-Z0-9_.-]+)`|"
|
||||
r" (?P<name2>~?[a-zA-Z0-9_.-]+))\s*", re.X)
|
||||
|
||||
def __init__(self, docstring: Union[str, List[str]], config: SphinxConfig = None,
|
||||
app: Sphinx = None, what: str = '', name: str = '',
|
||||
|
@ -479,6 +479,8 @@ Raises:
|
||||
If the dimensions couldn't be parsed.
|
||||
`InvalidArgumentsError`
|
||||
If the arguments are invalid.
|
||||
:exc:`~ValueError`
|
||||
If the arguments are wrong.
|
||||
|
||||
""", """
|
||||
Example Function
|
||||
@ -488,6 +490,7 @@ Example Function
|
||||
:raises AttributeError: errors for missing attributes.
|
||||
:raises ~InvalidDimensionsError: If the dimensions couldn't be parsed.
|
||||
:raises InvalidArgumentsError: If the arguments are invalid.
|
||||
:raises ~ValueError: If the arguments are wrong.
|
||||
"""),
|
||||
################################
|
||||
("""
|
||||
|
Loading…
Reference in New Issue
Block a user