Skip to content

Conversation

@Torfkopp
Copy link

@Torfkopp Torfkopp commented Dec 2, 2025

When using windows and working in a file called for example test.md, the drawing will then be saved under ./test.m/hash.svg

This is due to const fsPath = editor.document.uri.fsPath; returning a path with backslashes () in windows, leading to fsPath.slice(0, fsPath.lastIndexOf("/")); cutting off only the last letter of the document.

My simple solution would be to add if (fsPath.includes("\\")) fsPath = editor.document.uri.path; to get a path with slashes (/) under windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant