diff options
| author | Rodrigo Dumont <rlsdumont@gmail.com> | 2017-03-25 18:27:26 -0300 |
|---|---|---|
| committer | Rodrigo Dumont <rlsdumont@gmail.com> | 2017-03-25 18:27:26 -0300 |
| commit | 91c11630ef1e0a5394754def253876507ac8b94d (patch) | |
| tree | bb6b474664c0ad8726c42af9953c96126923423b /todolist/parser.go | |
| parent | bd1c22d1af9cde98a7e1340df4d6d4e187b6b889 (diff) | |
Adds support to projects with hyphen
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 72f6d67..ca5083a 100644 --- a/todolist/parser.go +++ b/todolist/parser.go @@ -38,7 +38,7 @@ func (p *Parser) Subject(input string) string { } func (p *Parser) ExpandProject(input string) string { - r, _ := regexp.Compile(`(ex|expand) +\d+ +\+[\p{L}\d_]+:`) + r, _ := regexp.Compile(`(ex|expand) +\d+ +\+[\p{L}\d_-]+:`) pattern := r.FindString(input) if len(pattern) == 0 { return "" @@ -50,7 +50,7 @@ func (p *Parser) ExpandProject(input string) string { } func (p *Parser) Projects(input string) []string { - r, _ := regexp.Compile(`\+[\p{L}\d_]+`) + r, _ := regexp.Compile(`\+[\p{L}\d_-]+`) return p.matchWords(input, r) } |
