Skip to content

Commit d30a136

Browse files
authored
Merge pull request skygragon#169 from lebeier/stat-graph-row-number-format-fix
fixed the row number format for `leetcode stat -g`
2 parents 5a27061 + fe9a9a9 commit d30a136

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 (let problem of problems)
105105
graph[problem.fid] = ICONS[problem.state] || ICONS.none;
106106

107-
let line = [sprintf(' %03s', 0)];
107+
let rowNumFormat = ' %04s';
108+
let line = [sprintf(rowNumFormat, 0)];
108109
for (let i = 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy