From 423d2a238487c21ef36621bf93442c87504bfc7c Mon Sep 17 00:00:00 2001 From: Grant Ammons Date: Tue, 9 May 2017 19:58:26 -0400 Subject: Trim space of the subject --- todolist/parser.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'todolist/parser.go') diff --git a/todolist/parser.go b/todolist/parser.go index 91f9b6e..4a0e5be 100644 --- a/todolist/parser.go +++ b/todolist/parser.go @@ -52,9 +52,9 @@ func (p *Parser) ParseEditTodo(todo *Todo, input string) bool { func (p *Parser) Subject(input string) string { if strings.Contains(input, " due") { index := strings.LastIndex(input, " due") - return input[0:index] + return strings.TrimSpace(input[0:index]) } else { - return input + return strings.TrimSpace(input) } } -- cgit v1.3