Skip to content

Comments

fix uri fragment slugification #94508#94655

Merged
mjbvz merged 1 commit intomicrosoft:masterfrom
iliazeus:94508-fix-markdown-link-slugification
Apr 9, 2020
Merged

fix uri fragment slugification #94508#94655
mjbvz merged 1 commit intomicrosoft:masterfrom
iliazeus:94508-fix-markdown-link-slugification

Conversation

@iliazeus
Copy link
Contributor

@iliazeus iliazeus commented Apr 8, 2020

Previously, all links to local files had their fragment parts normalized (e.g. foo.md#Bar baz became foo.md#bar-baz). This allowed links to specific sections of other markdown files (file#Section header), but broke many other links.

This PR limits the normalization to paths without a file extension (as per suggestion).

This may, however, have an unfortunate side effect of breaking some markdown links that do have an extension (e.g. foo.md#Bar baz won't work, but foo#Bar baz will).

This PR fixes #94508

@mjbvz mjbvz self-assigned this Apr 8, 2020
@iliazeus
Copy link
Contributor Author

iliazeus commented Apr 9, 2020

Added an additional check for known markdown file extensions. Now links are slugified if they have a markdown file extensions or do not have an extension at all.

@iliazeus iliazeus requested a review from mjbvz April 9, 2020 07:01
@mjbvz mjbvz added this to the April 2020 milestone Apr 9, 2020
@mjbvz mjbvz merged commit f3a31a4 into microsoft:master Apr 9, 2020
@mjbvz
Copy link
Collaborator

mjbvz commented Apr 9, 2020

Thanks! This change will be in the next VS code insiders build and is scheduled to go out with VS Code 1.45

@iliazeus iliazeus deleted the 94508-fix-markdown-link-slugification branch April 17, 2020 08:20
@github-actions github-actions bot locked and limited conversation to collaborators May 24, 2020
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.

Markdown Rendering drops '=' from relative paths

2 participants