Closed heaths closed 3 years ago
This is a goldmark repository. I do not know about cli/cli. Your report is completely about cli/cli.
The cli uses your module to do the markdown rendering. I used the CLI only as a repro. This is a request to use the OSC 8 sequence to explicitly wrap links when rendering.
Digging into this more, I see that charmbracelet/glamour is doing the actual rendering, and there is already a bug tracking this.
In the GitHub CLI, there are several commands that show links as shown in the repro below. If these links span new lines, the link parts are rendered as separate links:
With the GitHub CLI installed:
If you look in the file for "image", you'll find a link like so:
Line 53 is truncated, but you can see how the URL https://user-images.githubusercontent.com/1532486/116502954-c3815e80-a869-11eb-8da8-51592e7d2ba6.png is wrapped. Terminals that automatically detect URLs will fail to open these links correctly - or at least as desired. In this case, it 404s because the detect link is only https://user-images.githubusercontent.com/1532486/116502954.
Alternatively, you could add OSC 8 (perhaps even optionally) sequences to explicit mark the link, as described here.
gh pr -R cli/cli view 3519 --comments
as in repro above.