fixed padding

master
yutent 2022-02-14 14:11:29 +08:00
parent 07a4743895
commit c097ec67a5
3 changed files with 3 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
{
"name": "bash-calendar",
"description": "终端版万年历",
"version": "1.2.2",
"version": "1.2.3",
"author": "yutent <yutent.io@gmail.com>",
"bin": {
"calendar": "index.js",

View File

@ -194,7 +194,7 @@ function drawTbody(year, month) {
if (tmp.lunar) {
pad = (10 - tmp.lunar.length * 2) / 2 - 2
}
if (pad > 0) {
if (pad >= 0) {
space = ' '.repeat(pad)
} else {
padSpace = padSpace.slice(0, pad)