foambubble / foam

A personal knowledge management and sharing system for VSCode
https://foambubble.github.io/
Other
15.47k stars 663 forks source link

Exclude workspace when linking to a file #1372

Closed pderaaij closed 2 months ago

pderaaij commented 4 months ago

This fixes #1332 and #1277.

vscode.workspace.asRelativePath needs to be told to exclude the workspace, as we already have in the resource location.

riccardoferretti commented 3 months ago

Thanks @pderaaij - a couple of things:

pderaaij commented 3 months ago

Will add a test. Focussed on #1290 first.

pderaaij commented 3 months ago

@riccardoferretti I am bit lost on the best way to add a test for this situation. The end-2-end test suite runs a single-root workspace. I can't see a way how to manipulate this on runtime. The alternative is to create an end-2-end test suite for a multi-root workspace, but that might be a bit too much. Do you have any thoughts on how to handle this?