Feel-ix-343/markdown-oxide

[[filename]] link renaming error

elgar328 opened this issue · 1 comments

There are file1.md and file2.md files as shown below.

file1.md

# title1

[[file2]]

file2.md

# title1

If I open file1.md in helix editor and rename the [[file2]] link to [[aaa]], the expected behavior is as follows.
file2.md --> aaa.md
[[file2]] --> [[aaa]]

However, there is no change in the name of file2.md and the [[file2]] link, and the name of file1.md being edited is changed to aaa.md.

Hello!

In this case, the text [[file2]] is not referenceable, so renaming on that text will default to renaming the file that the cursor is in. This is the same as renaming on any blank space in the file, while renaming on a heading, which is referenceable, will rename that heading not the file. This is explained briefly in the readme.

In short, renaming on links doesn't work right now. If you want to rename a file, you must move your cursor to that file, find a place without any headings, and rename. It will then rename the file in the filesystem and in all of the links referencing it.

I think your use case is valid though, so I have opened an issue #126