File tree Expand file tree Collapse file tree 4 files changed +16
-20
lines changed
Expand file tree Collapse file tree 4 files changed +16
-20
lines changed Original file line number Diff line number Diff line change @@ -365,15 +365,13 @@ https://github.com/kawre/leetcode.nvim/assets/69250723/b7be8b95-5e2c-4153-8845-4
365365
366366 ``` lua
367367 local leet_arg = " leetcode.nvim"
368+ ```
368369
369- return {
370+ ``` lua
371+ {
370372 " kawre/leetcode.nvim" ,
371- ...
372373 lazy = leet_arg ~= vim .fn .argv ()[1 ],
373- opts = {
374- arg = leet_arg ,
375- },
376- ...
374+ opts = { arg = leet_arg },
377375 }
378376 ```
379377
Original file line number Diff line number Diff line change @@ -367,15 +367,13 @@ https://github.com/kawre/leetcode.nvim/assets/69250723/b7be8b95-5e2c-4153-8845-4
367367
368368 ``` lua
369369 local leet_arg = " leetcode.nvim"
370+ ```
370371
371- return {
372+ ``` lua
373+ {
372374 " kawre/leetcode.nvim" ,
373- ...
374375 lazy = leet_arg ~= vim .fn .argv ()[1 ],
375- opts = {
376- arg = leet_arg ,
377- },
378- ...
376+ opts = { arg = leet_arg },
379377 }
380378 ```
381379
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ local ConsolePopup = require("leetcode-ui.popup.console")
44local t = require (" leetcode.translator" )
55
66--- @class lc.ui.Console.TestcasePopup : lc.ui.Console.Popup
7- --- @field testcases table<string[][] >
7+ --- @field testcases table<string[]>
88--- @field extmarks integer[]
99local Testcase = ConsolePopup :extend (" LeetTestcasePopup" )
1010
Original file line number Diff line number Diff line change @@ -104,17 +104,17 @@ local function filter_questions(questions, opts)
104104
105105 --- @param q lc.cache.Question
106106 return vim .tbl_filter (function (q )
107- local flag = true
108- if opts .difficulty then
109- if not vim . tbl_contains ( opts . difficulty , q . difficulty : lower ()) then return false end
107+ local diff_flag = true
108+ if opts .difficulty and not vim . tbl_contains ( opts . difficulty , q . difficulty : lower ()) then
109+ diff_flag = false
110110 end
111111
112- if opts . status then
113- if not q .status then return true end
114- if not vim . tbl_contains ( opts . status , q . status ) then return false end
112+ local status_flag = true
113+ if opts . status and not vim . tbl_contains ( opts . status , q .status ) then --
114+ status_flag = false
115115 end
116116
117- return true
117+ return diff_flag and status_flag
118118 end , questions )
119119end
120120
You can’t perform that action at this time.
0 commit comments