From e1c64695062c039e77891f007735301e8c8124a0 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Sat, 24 Jan 2026 16:34:05 -0500 Subject: [PATCH] Fix clampTrailingWhitespace breaking entries that contain both notes and other fields --- core/util.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/util.go b/core/util.go index f70e22b..145a15c 100644 --- a/core/util.go +++ b/core/util.go @@ -161,13 +161,13 @@ func clampTrailingWhitespace(decSlice []string) []string { switch endSpacesCount { case 0: // no trailing spaces - decSlice[i] = noteLine + decSlice[i+4] = noteLine case 1: // remove the single trailing space - decSlice[i] = strings.TrimRight(noteLine, " ") + decSlice[i+4] = strings.TrimRight(noteLine, " ") default: // truncate the trailing spaces to two - decSlice[i] = noteLine[:len(noteLine)-endSpacesCount+2] + decSlice[i+4] = noteLine[:len(noteLine)-endSpacesCount+2] } } }