From 048f54f2b0e448712c3d97fad14628d094afc67c Mon Sep 17 00:00:00 2001 From: Rob Ruana Date: Wed, 27 May 2015 10:57:04 -0700 Subject: [PATCH] Closes #1904: [Napoleon] parses restructuredtext references in fields/params BEFORE splitting on colon --- sphinx/ext/napoleon/docstring.py | 70 +++++++++++++++++----------- tests/test_ext_napoleon_docstring.py | 38 +++++++++++++++ 2 files changed, 81 insertions(+), 27 deletions(-) diff --git a/sphinx/ext/napoleon/docstring.py b/sphinx/ext/napoleon/docstring.py index 1ac7d869f..40d6bfa04 100644 --- a/sphinx/ext/napoleon/docstring.py +++ b/sphinx/ext/napoleon/docstring.py @@ -23,8 +23,8 @@ from sphinx.util.pycompat import UnicodeMixin _directive_regex = re.compile(r'\.\. \S+::') -_google_untyped_arg_regex = re.compile(r'(.+)\s*(?