From b65c69dc22c19ce3ee6817495256cb44c50b2131 Mon Sep 17 00:00:00 2001 From: Miao Cai Date: Thu, 14 Jan 2021 04:20:50 +0800 Subject: [PATCH] fix: truncate gist length to fit with most monospace fonts (#83) --- dist/index.js | 2 +- index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index bf29a3caa..8ac0674d7 100644 --- a/dist/index.js +++ b/dist/index.js @@ -862,7 +862,7 @@ module.exports = (function(e, t) { const n = e.data.languages[t]; const { name: i, percent: s, text: o } = n; const a = [ - trimRightStr(i, 11).padEnd(11), + trimRightStr(i, 10).padEnd(10), o.padEnd(14), generateBarChart(s, 21), String(s.toFixed(1)).padStart(5) + "%" diff --git a/index.js b/index.js index 656240d98..85fbf1d47 100644 --- a/index.js +++ b/index.js @@ -36,7 +36,7 @@ async function updateGist(stats) { const { name, percent, text: time } = data; const line = [ - trimRightStr(name, 11).padEnd(11), + trimRightStr(name, 10).padEnd(10), time.padEnd(14), generateBarChart(percent, 21), String(percent.toFixed(1)).padStart(5) + "%"