fix/markdown_awareness_for_edit #7

Merged
gmgauthier merged 4 commits from fix/markdown_awareness_for_edit into master 2026-03-30 13:05:10 +00:00
Showing only changes of commit 0b3e544143 - Show all commits

View File

@ -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")
}
}