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
{{ message }}
Repository navigation
Markdown preview no longer shows images with root relative path #110812
bugIssue identified by VS Code Team member as probable bughelp wantedIssues identified as good community contribution opportunitiesinsiders-releasedPatch has been released in VS Code Insidersmarkdown-extThe Markdown extension: language features and previewverifiedVerification succeeded
Matt Bierner (@mjbvz) I took a look at this and found that the issue is that the resource vscode-webview-resource uri is invalid, is missing /file/// before /home/jeanpierre/...
I was looking how to fix it but I can't find the place where the img.src gets mapped to a vscode-webview-resource
bugIssue identified by VS Code Team member as probable bughelp wantedIssues identified as good community contribution opportunitiesinsiders-releasedPatch has been released in VS Code Insidersmarkdown-extThe Markdown extension: language features and previewverifiedVerification succeeded
Activity
jeanp413 commentedon Jan 6, 2021
Matt Bierner (@mjbvz) I took a look at this and found that the issue is that the resource vscode-webview-resource uri is invalid, is missing
/file///before/home/jeanpierre/...I was looking how to fix it but I can't find the place where the
img.srcgets mapped to avscode-webview-resourcecan you give me some code pointers?
bart-gander commentedon Jan 12, 2021
Jean Pierre (@jeanp413) here is my quick and dirty fix for this issue:
bart-gander@0214f91
mjbvz commentedon Jan 13, 2021
Jean Pierre (@jeanp413) Start by looking in the markdown link normalizer
vscode/extensions/markdown-language-features/src/markdownEngine.ts
Line 229 in f732547
I believe this is passed the raw image links and tries to transform them into url that VS Code can render in the preview
jeanp413 commentedon Jan 19, 2021
Thanks Matt Bierner (@mjbvz) and @bartholomew-gander after spending some more time looking at this I think I found a proper fix for it
Fix microsoft#110812
Fix #110812 (#114553)