File tree Expand file tree Collapse file tree 4 files changed +5
-2
lines changed Expand file tree Collapse file tree 4 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,8 @@ function Cases:init(item, parent)
61
61
local total = item .total_testcases ~= vim .NIL and item .total_testcases or 0
62
62
for i = 1 , total do
63
63
self .cases [i ] = Case ({
64
+ -- TODO: cache the testcases on submission,
65
+ -- so it doesn't get out of sync
64
66
input = self .console .testcase .testcases [i ],
65
67
output = item .code_answer [i ],
66
68
expected = item .expected_code_answer [i ],
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ function Testcase:populate()
29
29
for i , case in ipairs (self .console .question .q .testcase_list ) do
30
30
if i ~= 1 then table.insert (tbl , " " ) end
31
31
32
+ -- TODO: Think of a better way to do this. Don't store testcases as a single strings
32
33
table.insert (self .testcases , case :gsub (" \n " , " " )[1 ])
33
34
34
35
for s in vim .gsplit (case , " \n " , { trimempty = true }) do
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ function Auth.handle(res, err)
31
31
local auth = res .data .userStatus
32
32
err = {}
33
33
34
- if auth .id == vim .NIL then
34
+ if ( not config . is_cn and auth .id == vim .NIL ) or ( config . is_cn and auth . slug == vim . NIL ) then
35
35
err .msg = " Session expired?"
36
36
elseif not auth .is_signed_in then
37
37
err .msg = " Sign-in failed"
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ local config = require("leetcode.config")
3
3
--- @class lc.translate
4
4
local translate = {
5
5
[" problems" ] = " 题库" ,
6
- [" statistics" ] = " 统计学 " ,
6
+ [" statistics" ] = " 统计 " ,
7
7
[" cookie" ] = " Cookie" ,
8
8
[" cache" ] = " 缓存" ,
9
9
[" exit" ] = " 退出" ,
You can’t perform that action at this time.
0 commit comments