foam icon indicating copy to clipboard operation
foam copied to clipboard

Ambiguous identifier when notes share the same file name with different capitalisation

Open zX3no opened this issue 8 months ago • 1 comments

Describe the bug

I have this file structure:

test/
┣ a/
┃ ┗ Note.md
┣ b/
┃ ┗ note.md
┗ root.md

When writing in root.md I'm trying to add the two notes a/Note.md and b/note.md. Using autocomplete after typing [[, I get an warning for an ambiguous identifier. Both notes complete like this: [[Note]] and [[note]].

Small Reproducible Example

No response

Steps to Reproduce the Bug or Issue

  1. Create two folders with a file that has the same file name with different capitalisation.
  2. Create a note in the root.
  3. Type [[ and try to autocomplete one of the notes.
  4. It should say 'Resource identifier is ambiguous'.

Expected behavior

When files have the same capitalisation and the file structure is like this:

test/
┣ a/
┃ ┗ Note.md
┣ b/
┃ ┗ Note.md
┗ root.md

Autocompletion works correctly and detects the ambiguity. The notes are completed as [[a/Note]] and [[b/Note]].

Screenshots or Videos

Code_-_Insiders_3PJIIdXLcM

Code_-_Insiders_E5Gn0Oi5Ln

Operating System Version

Windows 10

Visual Studio Code Version

Version: 1.84.0-insider (user setup) Commit: 60182c7e1a666961ded4d0319c154f52d85daf30 Date: 2023-10-30T23:41:49.215Z Electron: 25.9.2 ElectronBuildId: 24603566 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.19044

Additional context

No response

zX3no avatar Nov 03 '23 09:11 zX3no