-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Test updating markdown paths on file move/rename #164522
Labels
Milestone
Comments
This was referenced Oct 25, 2022
@mjbvz above you've mentioned
What does it do? I could not find it anywhere. |
I think these are reference-style links |
This was referenced Oct 25, 2022
Created #164650, but not directly related to the feature |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Test for #148146
Complexity: 4
Create Issue
Overview
This new feature allows markdown to automatically update all markdown links when a file is renamed/moved in the workspace. This is only supported for file moves/renames that happen within VS Code's explorer. It is also only supported for markdown style links (not html
<a>
links inside markdown)Testing
Enable this new behavior using
"markdown.updateLinksOnFileMove.enabled": "prompt"
Create some markdown links to local files:
For this, try out some of these variants:
[text](/workspace/root/path/to/file.md)
[text](relative/path/to/file.md)
[text](path/fileNoExt)
(should referencepath/fileNoExt.md
)[text](path/file.md#some-header)
![alt](path/img.png)
[definition]: /path/to/file.md
Ensure that with
prompt
, renaming or moving anymd
or image file triggers a dialog that lets you update all markdown linksNow try renaming some directories that contain the referenced files. Ensure this also triggers a update
Finally try changing
markdown.updateLinksOnFileMove.externalFileGlobs
. This setting controls the types of files we try updating paths for (we always enable it for markdown files).The default value enables it for common image file names. Try enabling it for
.js
files or some other format tooThe text was updated successfully, but these errors were encountered: