File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,10 @@ def get_location(node, app):
97
97
(path , line ) = get_source_line (node )
98
98
99
99
if path :
100
-
100
+ # sometimes the 'path' can contain ':' which are forbidden on
101
+ # windows, but on posix just passes through.
102
+ path , * post = path .partition (':' )
103
+ post = '' .join (post )
101
104
# We locate references relative to the parent of the doc
102
105
# directory, which for matplotlib, will be the root of the
103
106
# matplotlib repo. When matplotlib is not an editable install
@@ -122,11 +125,11 @@ def get_location(node, app):
122
125
123
126
else :
124
127
path = "<unknown>"
125
-
128
+ post = ''
126
129
if not line :
127
130
line = ""
128
131
129
- return f"{ path } :{ line } "
132
+ return f"{ path } { post } :{ line } "
130
133
131
134
132
135
def _truncate_location (location ):
You can’t perform that action at this time.
0 commit comments