Skip to content
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

[markdown-preview] resolve relative links properly #6403

Merged
merged 1 commit into from
Oct 17, 2019
Merged

Conversation

akosyakov
Copy link
Member

@akosyakov akosyakov commented Oct 16, 2019

What it does

fix #6396: resolve relative links properly

Latest version of vscode-uri makes sure that URI always has a scheme or falls back to file scheme and that URI is always absolute by adding leading / to the relative path. It broke an assumption that a URI can be relative in the markdown preview.

How to test

  • Try to navigate from README file using relative links, for example to docs.
  • Make sure to test such links with fragments.
  • Make sure to test links to external websites as well, i.e. absolute and with not file scheme.

Review checklist

Reminder for reviewers

Latest version of vscode-uir makes sure that URI always has a scheme  or fall backs to `file` scheme and that URI is always absolute by adding leading `/` to the relative path. It broke an assumption that a URI can be relative in the markdown preview.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
@akosyakov akosyakov added the preview issues related to the preview label Oct 16, 2019
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The relative links in markdown-previews now work correctly for me 👍.
I verified both relative and absolute links and they both work correctly.

@akosyakov akosyakov merged commit 5cd87bf into master Oct 17, 2019
@akosyakov akosyakov deleted the GH-6396 branch October 17, 2019 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview issues related to the preview
Projects
None yet
Development

Successfully merging this pull request may close these issues.

markdown preview cannot open relative file links
2 participants