path aren't updated inside files of a moved folder
Here is my structure, with the reference from file1.md to file2.md
I move the folder4 inside folder3 like this:
And as you can see the path inside the file1.md didn't actualized to "../" more.
Is it a normal behavior?
The extension is working because, if I move folder6 inside folder5, the relative path inside file1.md is updating:
Thus, there is a limitation: path aren't actualized inside the moved file.
The problem is that when a folder is moved, the workspace.onDidRenameFiles() function detects a renaming on the folder and not on the files inside. Thus, in handleRenameEvent() this part doesn't get any content :
const fileContent = markdownFiles.find(
(file) => path.posix.normalize(file.path) === pathAfter
)?.content;
I am working on it 👍
Solved ! You can get the extension (.vsix) from this waiting PR and install it on your own Visual Studio: https://github.com/mathiassoeholm/markdown-link-updater/pull/34