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

Commit 386fabb

Browse files
committed
1.0.4 修改替换null为none的匹配为正则,修复了只替换了第一个匹配的错误。
1 parent 42c81fa commit 386fabb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "python-leetcode",
33
"displayName": "PythonLeetcode",
44
"description": "Solve LeetCode problems in VS Code",
5-
"version": "1.0.3",
5+
"version": "1.0.4",
66
"author": "KuiyuanFu",
77
"publisher": "KuiyuanFu",
88
"license": "MIT",

src/leetCodeExecutor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ class LeetCodeExecutor implements Disposable {
342342
return "listToListNode(" + p + ")"
343343
}
344344
else if (paraItemPair[1] == 'TreeNode') {
345-
p = p.replace('null', 'None')
345+
p = p.replace(/null/g, 'None')
346346
return "listToTreeNode(" + p + ")"
347347
}
348348
else {

0 commit comments

Comments
 (0)