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

Test updating markdown paths on file move/rename #164522

Closed
3 tasks done
mjbvz opened this issue Oct 24, 2022 · 3 comments
Closed
3 tasks done

Test updating markdown paths on file move/rename #164522

mjbvz opened this issue Oct 24, 2022 · 3 comments

Comments

@mjbvz
Copy link
Collaborator

mjbvz commented Oct 24, 2022

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 reference path/fileNoExt.md)
    • [text](path/file.md#some-header)
    • ![alt](path/img.png)
    • [definition]: /path/to/file.md
  • Ensure that with prompt, renaming or moving any md or image file triggers a dialog that lets you update all markdown links

  • Now 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 too

@weinand
Copy link
Contributor

weinand commented Oct 25, 2022

@mjbvz above you've mentioned

[definition]: /path/to/file.md

What does it do? I could not find it anywhere.

@andreamah
Copy link
Contributor

@mjbvz above you've mentioned

[definition]: /path/to/file.md

What does it do? I could not find it anywhere.

I think these are reference-style links

@amunger
Copy link
Contributor

amunger commented Oct 25, 2022

Created #164650, but not directly related to the feature

@amunger amunger removed their assignment Oct 25, 2022
@amunger amunger closed this as completed Oct 25, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants