diff --git a/cmd/edit.go b/cmd/edit.go index 973693d..f7f9dc5 100644 --- a/cmd/edit.go +++ b/cmd/edit.go @@ -103,7 +103,11 @@ var editCmd = &cobra.Command{ func removeLastModifiedComments(content string) string { lines := strings.Split(content, "\n") cleanedLines := make([]string, 0, len(lines)) - cleanedLines = append(cleanedLines, lines...) - + for _, line := range lines { + trimmed := strings.TrimSpace(line) + if !strings.Contains(strings.ToLower(trimmed), "last modified") { + cleanedLines = append(cleanedLines, line) + } + } return strings.Join(cleanedLines, "\n") -} +} \ No newline at end of file