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

Make sure link fragment is preserved #193743

Merged
merged 2 commits into from
Oct 5, 2023

Conversation

whscullin
Copy link
Contributor

Makes sure that the fragment part of a link is preserved when in a notebooks. There is existing special handing for links starting with #, but not with both a path and a fragment part.

Fixes #193742

To test this, create a link in a notebook markdown cell in the form of

[Link](file.html#anchor)

When clicking on this link currently, you'll get a dialog. "Unable to open 'file.html#anchor' Cancel/Create File"
With this fix, you will either open file.html if it exists, or get a "Unable to open 'file.html' Cancel/Create File" dialog.

@whscullin
Copy link
Contributor Author

@microsoft-github-policy-service agree [company="Google"]

@whscullin
Copy link
Contributor Author

@microsoft-github-policy-service agree company="Google"

@VSCodeTriageBot VSCodeTriageBot added this to the October 2023 milestone Oct 5, 2023
@rebornix rebornix merged commit 413e8cb into microsoft:main Oct 5, 2023
6 checks passed
Alex0007 pushed a commit to Alex0007/vscode that referenced this pull request Oct 26, 2023
Co-authored-by: Peng Lyu <penn.lv@gmail.com>
@github-actions github-actions bot locked and limited conversation to collaborators Nov 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Notebooks: Links with both a path and fragment in markdown attempt to open incorrect file.
4 participants