From e485af50f937b3256d9c037fbfc7b591d1e35f84 Mon Sep 17 00:00:00 2001 From: cocobear Date: Wed, 8 Jan 2020 14:06:30 +0800 Subject: [PATCH] fix alignment --- lib/commands/stat.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/commands/stat.js b/lib/commands/stat.js index 3c51ab98..44cc72dc 100644 --- a/lib/commands/stat.js +++ b/lib/commands/stat.js @@ -98,13 +98,13 @@ function showGraph(problems) { const header = _.range(groups) .map(x => sprintf('%4s%18s', x * 10 + 1, x * 10 + 10)) .join(''); - log.info(' ' + header); + log.info(' ' + header); const graph = []; for (let problem of problems) graph[problem.fid] = ICONS[problem.state] || ICONS.none; - let line = [sprintf(' %03s', 0)]; + let line = [sprintf(' %04s', 0)]; for (let i = 1, n = graph.length; i <= n; ++i) { // padding before group if (i % 10 === 1) line.push(' '); @@ -114,7 +114,7 @@ function showGraph(problems) { // time to start new row if (i % (10 * groups) === 0 || i === n) { log.info(line.join(' ')); - line = [sprintf(' %03s', i)]; + line = [sprintf(' %04s', i)]; } }