summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorPaul Bütow <1224732+snonux@users.noreply.github.com>2025-06-20 00:23:30 +0300
committerPaul Bütow <1224732+snonux@users.noreply.github.com>2025-06-20 00:23:30 +0300
commit17ae0b210c109e625f8afb54b08de2c25f272c96 (patch)
treecf37cacd7af2d3c837d1bd9cffeef962450c93a8 /cmd
parent77620dcd609aa53a81effd23174d56e622f16cc8 (diff)
Add task manipulation helpers and tests
Diffstat (limited to 'cmd')
-rw-r--r--cmd/tasksamurai/main.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/tasksamurai/main.go b/cmd/tasksamurai/main.go
index 658cb05..56ee08a 100644
--- a/cmd/tasksamurai/main.go
+++ b/cmd/tasksamurai/main.go
@@ -85,8 +85,9 @@ func formatDue(s string) string {
days := int(time.Until(ts).Hours() / 24)
val := fmt.Sprintf("%dd", days)
+ style := lipgloss.NewStyle()
if days < 0 {
- val = lipgloss.NewStyle().Background(lipgloss.Color("1")).Render(val)
+ style = style.Background(lipgloss.Color("1"))
}
- return val
+ return style.Render(val)
}