diff options
| author | Quey-Liang Kao <nonerkao@gmail.com> | 2017-01-26 20:42:37 +0800 |
|---|---|---|
| committer | Quey-Liang Kao <nonerkao@gmail.com> | 2017-01-26 20:42:37 +0800 |
| commit | 50d0119567d2dcae7729bf4e7a841702ba9171d0 (patch) | |
| tree | 5f7beaed61bd161a2d3b593c7f9136bf18fa889c /todolist/formatter.go | |
| parent | bfd33a9904daac273ff2b708d02c738be276b8c7 (diff) | |
Support UTF-8 strings as contexts and projects
Diffstat (limited to 'todolist/formatter.go')
| -rw-r--r-- | todolist/formatter.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/todolist/formatter.go b/todolist/formatter.go index db4aa4b..43d9b1e 100644 --- a/todolist/formatter.go +++ b/todolist/formatter.go @@ -103,8 +103,8 @@ func (f *Formatter) formatSubject(subject string) string { magenta := color.New(color.FgMagenta).SprintFunc() splitted := strings.Split(subject, " ") - projectRegex, _ := regexp.Compile(`\+\w+`) - contextRegex, _ := regexp.Compile(`\@\w+`) + projectRegex, _ := regexp.Compile(`\+[\p{L}\d_]+`) + contextRegex, _ := regexp.Compile(`\@[\p{L}\d_]+`) coloredWords := []string{} |
