Skip to content

Clarify unnecessary special handling for colons in paths. #15050

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 13, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions doc/sphinxext/missing_references.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ def get_location(node, app):
cannot locate the original source file (usually because an extension
has injected text into the sphinx parsing engine).
"""
(path, line) = get_source_line(node)
source, line = get_source_line(node)

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