From 8e77e4e86bbcffc1ca30b25ba26b0225a578df90 Mon Sep 17 00:00:00 2001 From: Grant Ammons Date: Thu, 5 May 2016 15:38:39 -0400 Subject: Strip out a or add --- todolist/parser.go | 2 ++ 1 file changed, 2 insertions(+) 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] -- cgit v1.3