Skip to content

ambiguous wikilink references #1563

@MountComb

Description

@MountComb

Describe the bug

Link references generated by the foam.edit.linkReferenceDefinitions settings does not handle ambiguous links correctly.

Small Reproducible Example

No response

Steps to Reproduce the Bug or Issue

  • Set foam.edit.linkReferenceDefinitions to "withExtensions" or "withoutExtensions"

  • Create dir1/foo.md and dir2/foo.md

  • Create bar.md and link to the dir2/foo.md as [[dir2/foo]], save the file.

  • See the generated link is [dir2/foo]: foo.md "foo", resulting the error:

    Resource identifier is ambiguousFoam(ambiguous-identifier)
    foo.md(1, 1): Possible target: dir1/foo.md
    foo.md(1, 1): Possible target: dir2/foo.md
    

Expected behavior

The generated link should be [dir2/foo]: dir2/foo.md "foo"

Screenshots or Videos

No response

Operating System Version

Fedora 42 in WSL2

Visual Studio Code Version

1.107.1 994fd12f8d3a5aa16f17d42c041e5809167e845a x64

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    foam-coreRelated to API, core model or feature

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions