diff options
| author | Grant Ammons <gammons@gmail.com> | 2017-05-09 19:58:26 -0400 |
|---|---|---|
| committer | Grant Ammons <gammons@gmail.com> | 2017-05-09 20:20:24 -0400 |
| commit | 423d2a238487c21ef36621bf93442c87504bfc7c (patch) | |
| tree | 2de21273c67b417de159383f7ee04373d0eca684 /todolist/parser.go | |
| parent | 1056fecdccbb734dc732a2f795f2591d3c63f951 (diff) | |
Trim space of the subject
Diffstat (limited to 'todolist/parser.go')
| -rw-r--r-- | todolist/parser.go | 4 |
1 files changed, 2 insertions, 2 deletions
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) } } |
