The fallback github url has additional "/" in path
imsaravana369 opened this issue · 4 comments
imsaravana369 commented
When we hit TryPurescript without any queryparams it needs to fallback back to mainGitHubExample,
mainGitHubExample :: String
mainGitHubExample = "/purescript/trypurescript/" <> tag <> "/client/examples/Main.purs"
mkGitHubUrl :: String -> URL
mkGitHubUrl id = "https://raw.githubusercontent.com/" <> id
when we call
>>> mkGitHubUrl mainGitHubExample
The resulting url is having an additional "/". This is crashing TryPurescript.
https://try.purescript.org
JordanMartinez commented
I think what you're saying is:
- Load a file using the GitHub url query param (e.g. a cookbook link: https://try.purescript.org/?github=/JordanMartinez/purescript-cookbook/master/recipes/BigIntJs/src/Main.purs)
- Click on the
View Mode'sGitHubmenu item - User sees "Not Found" error
Is that what you meant?
imsaravana369 commented
imsaravana369 commented
It's seems to be occuring the first time only (options call)
JordanMartinez commented
I just tried opening https://try.purescript.org/ in incognito mode and didn't get the above error.
