You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I remove the # sign it works, but that is a valid URL, so I would expect it to be handled by the parser.
The problem appears when I register a custom definition provider:
monaco.languages.registerDefinitionProvider('javascript', {
provideDefinition: (model, position, cancellationToken) => {
/**
* Get the uri to redirect to
*/
const uri = getTheUriSomehowInStringFormat()
return {
uri: monaco.Uri.parse(uri),
range: new monaco.Range(3, 1, 3, 1)
}
})
}
And now I am redirected to the uri with escaped / character. If that's just a toString method, as suggested in previous issue, then I guess it's monaco internal call of toString somewhere?
The text was updated successfully, but these errors were encountered:
I believe you are correct, but it appears that the Uri from VS Code is generally accepted to be a broken implementation, but unfortunately it will not be changed anymore because of breaking existing VS Code extensions.
I can't reopen my old issue #1097, that's why I create a new one because I encountered the same problem once again.
So, monaco.Uri.parse wrongly parses URL, escaping the
/
character.This is my url:
http://localhost:8081/#/applications/app/82bb8afa-0401-4562-aca2-2eb1ff2eb06a/field/fe5ba7a9-689d-4cc2-89ae-fc076c6473cc
The parse method turns it into:
http://localhost:8081/#/%2Fapplications%2Fapp%2F82bb8afa-0401-4562-aca2-2eb1ff2eb06a%2Ffield%2Ffe5ba7a9-689d-4cc2-89ae-fc076c6473cc
When I remove the # sign it works, but that is a valid URL, so I would expect it to be handled by the parser.
The problem appears when I register a custom definition provider:
And now I am redirected to the uri with escaped
/
character. If that's just atoString
method, as suggested in previous issue, then I guess it's monaco internal call oftoString
somewhere?The text was updated successfully, but these errors were encountered: