Skip to content

nb move to a subdirectory should not break existing links/id #435

Description

@taniki

Sorry if this is a duplicated issue. I dug around but have not found anything related.

Right now if one moves a note to a subdirectory, the note is removed from the index. This breaks pre-existing wikilinks.

I don't want to jump directly into solutions because I have no idea how it can be resolved efficiently. Here are some suggestions tho:

  • replace the former filename with a fullpath, instead of an empty line, and filter out lines with a folder delimitator to keep consistency with current behaviour
  • modify all wikilinks, that's what logseq is doing, for example. I guess this can be easily solved with sed if not considering modifying other notebooks.

That might also help prevent some minor bugs, like nb edit -l on a note that has been moved after it has been modified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions