File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 88// DefaultTemplate is the default report template
99const DefaultTemplate = `
1010{{- range $index, $todo := . }}
11- {{ print "\u001b[33m" }}TODO{{ print "\u001b[0m" }}{{ .String }}
11+ {{ print "\u001b[33m" }}TODO{{ print "\u001b[0m" }}: {{ .String }}
1212 => {{ with .Comment }}{{ .FilePath }}:{{ .StartLocation.Line }}:{{ .StartLocation.Pos }}{{ end }}
1313{{ else }}
1414no todos 🎉
Original file line number Diff line number Diff line change 11package todos
22
33import (
4+ "regexp"
45 "strings"
56
67 "github.com/augmentable-dev/tickgit/pkg/comments"
@@ -26,7 +27,8 @@ func NewToDo(comment comments.Comment) *ToDo {
2627 if ! strings .Contains (s , "TODO" ) {
2728 return nil
2829 }
29- s = strings .Replace (comment .String (), "TODO" , "" , 1 )
30+ re := regexp .MustCompile (`TODO:?` )
31+ s = re .ReplaceAllLiteralString (comment .String (), "" )
3032 s = strings .Trim (s , " " )
3133
3234 todo := ToDo {Comment : comment , String : s }
You can’t perform that action at this time.
0 commit comments