From 17ae0b210c109e625f8afb54b08de2c25f272c96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20B=C3=BCtow?= <1224732+snonux@users.noreply.github.com> Date: Fri, 20 Jun 2025 00:23:30 +0300 Subject: Add task manipulation helpers and tests --- cmd/tasksamurai/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cmd') 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) } -- cgit v1.2.3