-
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 9 replies
-
|
I am also seeing this (file hyperlinks no longer working) in: Positron Version: 2024.10.0 (Universal) build 14 |
Beta Was this translation helpful? Give feedback.
-
|
I'm seeing this in developer console: |
Beta Was this translation helpful? Give feedback.
-
|
This commit looks likely to be the culprit (but this should be taken with a big grain of salt): 833a9b3#diff-b68e95d8ebaec9fc38aad38c3df9f68d2951bc577b3de330bf552bcafa7f1d34R619 |
Beta Was this translation helpful? Give feedback.
-
|
I think it's a positron bug. |
Beta Was this translation helpful? Give feedback.
-
|
By the time there's an attempt to open the file, it has become
Screenshot is with Positron Version: 2024.10.0 (Universal) build 14 |
Beta Was this translation helpful? Give feedback.
-
|
I am not seeing a problem with this clickable link: cli::cli_text("{.file NEWS.md}")so that suggests there may be an interaction between positron changes and this style of file url |
Beta Was this translation helpful? Give feedback.
-
|
Here's the working file hyperlink, produce via inline markup:
So it's using an absolute path that starts with |
Beta Was this translation helpful? Give feedback.
-
|
@olivroy something that puzzles me. Using > dput(cli::style_hyperlink(
+ "file","file://NEWS.md", list(line = 6, col = 2)
+ ))
structure("\033]8;line = 6:col = 2;file://NEWS.md\afile\033]8;;\a", class = c("cli_ansi_string",
"ansi_string", "character"))
> dput(cli::style_hyperlink(
+ "file","file://NEWS.md", c(line = 6, col = 2)
+ ))
structure("\033]8;line = 6:col = 2;file://NEWS.md\afile\033]8;;\a", class = c("cli_ansi_string",
"ansi_string", "character")) |
Beta Was this translation helpful? Give feedback.


I did a lot of research on file hyperlinks when working on #2413. I think the best outside authority to consult is RFC 8089 The "file" URI Scheme:
https://datatracker.ietf.org/doc/html/rfc8089
I don't really see any support for relative paths in such links. Leading up to now, I think it's fair to say that cli hyperlinks and RStudio support of said hyperlinks sort of co-evolved to perhaps handle nonstandard hyperlinks or to go beyond the standard. So this may not be an area where Positron implements 100% of what RStudio does. Positron will likely stick close to the standard.
My guess is that, if you are creating a hyperlink yourself, your code should look like this to have the best chance …