File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -517,11 +517,17 @@ end
517
517
"""
518
518
$(:SIGNATURES )
519
519
520
- Get the URL (file and line number) where a method `m` is defined.
520
+ Get the URL (file and line number) where a method `m` is defined. May return an empty string
521
+ if the URL can not be determined.
521
522
522
- Note that this is `Base.url` .
523
+ Requires the `LibGit2` to be present in the environment .
523
524
"""
524
- url (m:: Method ) = Base. url (m)
525
+ function url (m:: Method )
526
+ # Base.url() something produces file:// URLs, but we want these to be sharable web URLs.
527
+ # So we just say we couldn't determine the URL if we get one of those.
528
+ url = Base. url (m)
529
+ return startswith (url, " file://" ) ? " " : url
530
+ end
525
531
526
532
# This is compat to make sure that we have ismutabletype available pre-1.7.
527
533
# Implementation borrowed from JuliaLang/julia (MIT license).
You can’t perform that action at this time.
0 commit comments