Skip to content

Commit 00d38cb

Browse files
committed
Fix #348 : correct context for AtelierAPI; fix CSP slashes
1 parent 76858e1 commit 00d38cb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/commands/viewOthers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export async function viewOthers(): Promise<void> {
2121
const getOthers = (info) => {
2222
return info.result.content[0].others;
2323
};
24-
const api = new AtelierAPI();
24+
const api = new AtelierAPI(file.uri);
2525
return api
2626
.actionIndex([file.name])
2727
.then((info) => {

src/utils/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export function currentFile(document?: vscode.TextDocument): CurrentFile {
8484
const { query } = url.parse(decodeURIComponent(uri.toString()), true);
8585
const csp = query.csp === "" || query.csp === "1";
8686
if (csp) {
87-
name = fileName;
87+
name = fileName.replace("\\", "/");
8888
} else if (fileExt === "cls") {
8989
const match = content.match(/^Class (%?\w+(?:\.\w+)+)/im);
9090
if (match) {

0 commit comments

Comments
 (0)