Fix clampTrailingWhitespace breaking entries that contain both notes and other fields

This commit is contained in:
2026-01-24 16:34:05 -05:00
parent cb3a554676
commit e1c6469506
+3 -3
View File
@@ -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]
}
}
}