Skip to content

Napoleon: Return statement containing colons is not handled correctly #1904

@qnzhou

Description

@qnzhou

This problem is related to #1831. It seems the greedy parsing strategy introduced in 42f2b30 is the culprit.

For example a return doc in Google style would be parsed incorrectly:

Returns: 
    :class:`numpy.ndarray`: A :math:`n \\times 2` array containing...

Napoleon "mis-parse" the return type as numpy.ndarray: A :math

Sphinx v1.3.1
Napoleon v0.3.4

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions