-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Feature/relative url #307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/relative url #307
Conversation
Problems still exist while using relative url ("resource"). |
@kylecarbs - I know this is only a week old, but do you have an estimate for when you'll be able to review this PR? Thanks! |
polite ping |
@@ -47,7 +47,8 @@ const newCreateElement = <K extends keyof HTMLElementTagNameMap>(tagName: K): HT | |||
}, | |||
set: (value: string): void => { | |||
if (value) { | |||
value = value.replace(/file:\/\//g, "/resource"); | |||
const resourceBaseUrl = location.pathname.replace(/\/$/, "") + "/resource"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't this only catch URLs that end with /
?
Something like https://ide.kwc.io/banana
wouldn't be caught with this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sure the url is correct.
Both
https://ide.kwc.io/banana
https://ide.kwc.io/banana/
use
https://ide.kwc.io/banana/resource
to request the resources
any chance of getting this merged in for the next release? this is a pretty big issue for how my environment is atm (of which I have limited control) |
* resrouce relative url * add url pathname for require.toUrl (fix webview url) * rest resrouce relative url * fix resource url * ignore .vscode
Issue: #241
Describe in detail the problem you had and how this PR fixes it
Is there an open issue you can link to?