dendron icon indicating copy to clipboard operation
dendron copied to clipboard

Rename note command doesn't update wikilinks to the renamed note if they are inside the renamed note

Open ryan-p-randall opened this issue 3 years ago • 4 comments

Please select the area your Bug applys to. (Multiple selections are Possible)

  • [ ] Onboard. Initial vault setup and import/export pods
  • [ ] Create. Note creation, lookup, snippets and templates
  • [x] Retrieve. Backlinks, references, graph view
  • [x] Structure. Refactoring, multi-vault and schemas
  • [ ] Publish. Sharing your repo with the world
  • [ ] Misc (Choose this if your not sure)

Describe the bug

The rename note command does not update references to a note if those notes are inside the note being renamed. (This is an odd edge case!)

Let's say I have note1 and note2, and both notes contain the wikilink [[note1]]. When I use the rename note command to change note1's file name to note01, the wikilink updates to [[note01]] inside note2. But it does not update inside note1, which is now named note01.

To Reproduce

Steps to reproduce the behavior:

  1. Open VS Code Command Palette.
  2. Userename note command to rename note that references itself with a wikilink.
  3. Look at the wikilink in that renamed note.
  4. See that wikilink still refers to old note name.

Expected behavior

Wikilinks should be updated, even if they are inside the renamed note.

Screenshots

Wikilink [[note1]] does not update when using rename note command to rename note1 to note01: shows error

Wikilink successfully updates in note2: shows error

Desktop (please complete the following information)

  • OS: Mac
  • Editor: VS Code
  • Dendron Version: 0.56.0

Additional context

Add any other context about the problem here.

Dendron Log file

Please attach the output of >Dev:Dendron: Open Logs here

ryan-p-randall avatar Aug 25 '21 06:08 ryan-p-randall

Thank you for the report! I can reproduce this. We'll track this item and let you know once it's fixed 🙂

hikchoi avatar Aug 25 '21 22:08 hikchoi

glad to see this issue has been tracked... awesome!

doscripting avatar Aug 26 '22 21:08 doscripting

This issue is featured in this week's round of CROP.

aleksey-rowan avatar Sep 07 '22 18:09 aleksey-rowan

The community has selected this issue as this week's CROP winner. 🎉

aleksey-rowan avatar Sep 13 '22 16:09 aleksey-rowan