Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 7e2c843

Browse files
committed
minor fixes
1 parent cd98419 commit 7e2c843

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@
181181
{
182182
"command": "leetcode.showProblem",
183183
"when": "never"
184+
},
185+
{
186+
"command": "leetcode.previewProblem",
187+
"when": "never"
184188
}
185189
],
186190
"explorer/context": [

src/leetCodeExecutor.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,20 +75,20 @@ class LeetCodeExecutor {
7575
);
7676
}
7777

78-
public async showProblem(node: IProblem, language: string, outDir: string): Promise<string> {
79-
const fileName: string = genFileName(node, language);
78+
public async showProblem(problemNode: IProblem, language: string, outDir: string): Promise<string> {
79+
const fileName: string = genFileName(problemNode, language);
8080
const filePath: string = path.join(outDir, fileName);
8181

8282
if (!await fse.pathExists(filePath)) {
83-
const codeTemplate: string = await this.executeCommandWithProgressEx("Fetching problem data...", "node", [await this.getLeetCodeBinaryPath(), "show", node.id, "-cx", "-l", language]);
83+
const codeTemplate: string = await this.executeCommandWithProgressEx("Fetching problem data...", "node", [await this.getLeetCodeBinaryPath(), "show", problemNode.id, "-cx", "-l", language]);
8484
await fse.writeFile(filePath, codeTemplate);
8585
}
8686

8787
return filePath;
8888
}
8989

90-
public async getDescription(node: IProblem): Promise<string> {
91-
return await this.executeCommandWithProgressEx("Fetching problem description...", "node", [await this.getLeetCodeBinaryPath(), "show", node.id, "-x"]);
90+
public async getDescription(problemNode: IProblem): Promise<string> {
91+
return await this.executeCommandWithProgressEx("Fetching problem description...", "node", [await this.getLeetCodeBinaryPath(), "show", problemNode.id, "-x"]);
9292
}
9393

9494
public async listSessions(): Promise<string> {

0 commit comments

Comments
 (0)