Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd30a136

Browse files
authored
Merge pull requestskygragon#169 from lebeier/stat-graph-row-number-format-fix
fixed the row number format for `leetcode stat -g`
2 parents5a27061 +fe9a9a9 commitd30a136

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎lib/commands/stat.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ function showGraph(problems) {
104104
for(letproblemofproblems)
105105
graph[problem.fid]=ICONS[problem.state]||ICONS.none;
106106

107-
letline=[sprintf(' %03s',0)];
107+
letrowNumFormat=' %04s';
108+
letline=[sprintf(rowNumFormat,0)];
108109
for(leti=1,n=graph.length;i<=n;++i){
109110
// padding before group
110111
if(i%10===1)line.push(' ');
@@ -114,7 +115,7 @@ function showGraph(problems) {
114115
// time to start new row
115116
if(i%(10*groups)===0||i===n){
116117
log.info(line.join(' '));
117-
line=[sprintf(' %03s',i)];
118+
line=[sprintf(rowNumFormat,i)];
118119
}
119120
}
120121

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp