artempyanykh / marksman

Write Markdown with code assist and intelligence in the comfort of your favourite editor.
MIT License
1.98k stars 35 forks source link

fix: Do not suggest 'Create file' code action for broken heading references #320

Closed artempyanykh closed 3 months ago

artempyanykh commented 3 months ago

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.