Previously, the code would assume lack of references meant the file doesn't exist. However, for references such as [[file#head]] this would also trigger when there's no head heading in an existing file file.
When someone used this code action it wiped out the existing file.
Now we extract the doc part and check that the doc exists.
Previously, the code would assume lack of references meant the file doesn't exist. However, for references such as [[file#head]] this would also trigger when there's no
head
heading in an existing filefile
.When someone used this code action it wiped out the existing file.
Now we extract the doc part and check that the doc exists.