-
Notifications
You must be signed in to change notification settings - Fork 204
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
Relative sources in <img> tags in README.md are not rewritten to absolute URLs #192
Comments
Can you show me what "complained" means? Did you get an error? |
Exactly, more specifically this error:
|
Is your extension in a GitHub repository? Can I check its sources? |
Sure, here it is. |
I've cloned that repo and ran
Something must be off in your machine. Do you have the latest vsce installed? |
You forgot to edit the readme, it worked because now it's written in other way, otherwise I wouldn't be able to publish it because of the error I'm reporting. Replace this: <img src="https://raw.githubusercontent.com/fabiospampinato/vscode-projects-plus/master/resources/logo-128x128.png" alt="Logo"> With this: <img src="resources/logo.png" alt="Logo"> If you have
Yes, I'm using the latest version of vsce. |
Got it. We don't support relative paths in Either keep using a full URL in the |
Is there a good reason for not enforcing the same rules for both cases? |
We try to locate (regex) where images are used in Markdown and upon finding those locations we rewrite their relative URLs to be absolute ones, if we also detect the repository in which the extension will be hosted. We don't do the same for image tags since that is just harder to parse and rewrite. If you feel that passionate about it, feel free to submit a PR which addresses that. 👍 |
known issue from vsce: microsoft/vscode-vsce#192
Using HTML for images (which allows centering and sizing) requires absolute URLs for `vcse` to not complain (which ruins locality) :( Related issue: microsoft/vscode-vsce#192
Using HTML for images (which allows centering and sizing) requires absolute URLs for `vcse` to not complain (which ruins locality) :( Related issue: microsoft/vscode-vsce#192
This adds a check for <img> tags in the readme file and modifies relative links just as it does for markdown images. fixes microsoft#192
EDIT: whoops, thought this was an issue for adding support on Github, not vscode 🤦♂ |
This adds a check for <img> tags in the readme file and modifies relative links just as it does for markdown images. fixes microsoft#192
But why even if i use a http url , it can't works. |
Switch to https ;-) |
I wrote a readme file in markdown, and I had no problems putting a local gif in it, but vsce complained about a local png, maybe because I inserted it like this (just for centering it):
The text was updated successfully, but these errors were encountered: