同时支持Windows和Linux
This commit is contained in:
parent
dde770393a
commit
b5dfacb12c
1 changed files with 2 additions and 9 deletions
11
extension.js
11
extension.js
|
@ -1,5 +1,4 @@
|
|||
const vscode = require("vscode");
|
||||
const path = require("path");
|
||||
|
||||
/**
|
||||
* @param {vscode.ExtensionContext} context
|
||||
|
@ -33,15 +32,9 @@ function activate(context) {
|
|||
res_range.start.character + 1,
|
||||
res_range.end.character - 1
|
||||
);
|
||||
console.log(res);
|
||||
if (!res.endsWith(".jpg")) res += ".png";
|
||||
const img_path = path.join(
|
||||
vscode.workspace.workspaceFolders[0].uri.path,
|
||||
"mower",
|
||||
"resources",
|
||||
...res.split("/")
|
||||
);
|
||||
const md = new vscode.MarkdownString(``);
|
||||
const img_path = `file://${vscode.workspace.workspaceFolders[0].uri.path}/mower/resources/${res}`;
|
||||
const md = new vscode.MarkdownString(``);
|
||||
return new vscode.Hover(md);
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue