aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--todolist/parser.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/todolist/parser.go b/todolist/parser.go
index 59a290a..f78ce38 100644
--- a/todolist/parser.go
+++ b/todolist/parser.go
@@ -23,6 +23,8 @@ func (p *Parser) ParseNewTodo(input string) *Todo {
}
func (p *Parser) Subject(input string) string {
+ r, _ := regexp.Compile(`^(add|a) `)
+ input = r.ReplaceAllString(input, "")
if strings.Contains(input, " due") {
index := strings.LastIndex(input, " due")
return input[0:index]