Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/langs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ export function createLink(editor: vscode.TextEditor, text: string): string {
// if not an absolute path, prepend current directory
if (!directory.startsWith("/")) {
// get path to current file
const fsPath = editor.document.uri.fsPath;
let fsPath = editor.document.uri.fsPath;
// To ensure next line works properly (windows problem)
if (fsPath.includes("\\")) fsPath = editor.document.uri.path;
// get directory of said file
const fileDirname = fsPath.slice(0, fsPath.lastIndexOf("/"));
// prepend directory to setting
Expand Down