File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
lua/leetcode-ui/group/pre Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -2,10 +2,16 @@ local Pre = require("leetcode-ui.group.pre")
22local t = require (" leetcode.translator" )
33local Line = require (" leetcode-ui.line" )
44local Lines = require (" leetcode-ui.lines" )
5+ local log = require (" leetcode.logger" )
56
67--- @class lc.ui.Stdout : lc.ui.Pre
78local Stdout = Pre :extend (" LeetStdout" )
89
10+ local function norm (str )
11+ local ins = vim .inspect (str )
12+ return ins :sub (2 , # ins - 1 )
13+ end
14+
915--- @param output string
1016---
1117--- @return lc.ui.Lines | nil
@@ -19,7 +25,7 @@ function Stdout:init(output)
1925
2026 local lines = Lines ()
2127 for i = 1 , # output_list do
22- lines :append (output_list [i ]):endl ()
28+ lines :append (norm ( output_list [i ]) ):endl ()
2329 end
2430
2531 local title = Line ():append ((" %s" ):format (t (" Stdout" )), " leetcode_alt" )
You can’t perform that action at this time.
0 commit comments