Skip to content

Commit

Permalink
Merge pull request #282 from ccagml/main
Browse files Browse the repository at this point in the history
第 40 题原始测试用例多了一个,字符 导致生成用例不对
  • Loading branch information
ccagml authored Dec 16, 2023
2 parents b75f4ce + a58dd5c commit 546a647
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# version 3.1.12

- 第 40 题原始测试用例多了一个,字符 导致生成用例不对

# version 3.1.11

- 避免启动多个调试
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-leetcode-problem-rating",
"displayName": "LeetCode",
"description": "%main.description%",
"version": "3.1.11",
"version": "3.1.12",
"author": "ccagml",
"publisher": "ccagml",
"license": "MIT",
Expand Down
6 changes: 6 additions & 0 deletions src/rpc/utils/storageUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,12 @@ class StorageUtils {
temp_case.push(temp_collect.trim());
} else {
// 解析 x = aaa, y = bbb 之类的输入参数

// 第40题,测试用例最后面多了一个,
if (new_ele.length > 10 && new_ele[new_ele.length - 1] == ",") {
new_ele = new_ele.slice(0, -1);
}

for (let index = new_ele.length - 1; index >= 0; index--) {
if (no_need_flag) {
if (new_ele[index] == ",") {
Expand Down

0 comments on commit 546a647

Please sign in to comment.