nextjs-github-browser icon indicating copy to clipboard operation
nextjs-github-browser copied to clipboard

Encode path in markdown (containing slashes in relative url)

Open topheman opened this issue 3 years ago • 0 comments

Steps to reproduce :

  • Go to https://nextjs-github-browser.vercel.app/topheman/webrtc-remote-control
  • Click on the link @webrtc-remote-control/core (or any other one of the packages)

You will get to https://nextjs-github-browser.vercel.app/topheman/webrtc-remote-control/blob/master?path=/packages/core#readme and have a 404 Repository not found

If you use the explorer, the link works : https://nextjs-github-browser.vercel.app/topheman/webrtc-remote-control/tree/master?path=packages%2Fcore because the slash is encoded in %2F

Edit: How to id a link to blob vs a link to a tree in the markdown ? Should be a different issue.

Maybe expose an api/route that redirect to either blob or tree based on a path ?

topheman avatar May 13 '22 19:05 topheman