fix/markdown_awareness_for_edit #7
10
cmd/edit.go
10
cmd/edit.go
@ -103,7 +103,11 @@ var editCmd = &cobra.Command{
|
|||||||
func removeLastModifiedComments(content string) string {
|
func removeLastModifiedComments(content string) string {
|
||||||
lines := strings.Split(content, "\n")
|
lines := strings.Split(content, "\n")
|
||||||
cleanedLines := make([]string, 0, len(lines))
|
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")
|
return strings.Join(cleanedLines, "\n")
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user