Skip to content

Commit abdc953

Browse files
committed
Clarify special handling for colons in paths.
1 parent 7de91c8 commit abdc953

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

doc/sphinxext/missing_references.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ def get_location(node, app):
9494
cannot locate the original source file (usually because an extension
9595
has injected text into the sphinx parsing engine).
9696
"""
97-
(path, line) = get_source_line(node)
97+
source, line = get_source_line(node)
9898

99-
if path:
100-
# sometimes the 'path' can contain ':' which are forbidden on
101-
# windows, but on posix just passes through.
102-
path, *post = path.partition(':')
99+
if source:
100+
# 'source' can have the form '/some/path:docstring of some.api' but the
101+
# colons are forbidden on windows, but on posix just passes through.
102+
path, *post = source.partition(':')
103103
post = ''.join(post)
104104
# We locate references relative to the parent of the doc
105105
# directory, which for matplotlib, will be the root of the

0 commit comments

Comments
 (0)