From 50d0119567d2dcae7729bf4e7a841702ba9171d0 Mon Sep 17 00:00:00 2001 From: Quey-Liang Kao Date: Thu, 26 Jan 2017 20:42:37 +0800 Subject: Support UTF-8 strings as contexts and projects --- todolist/formatter.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'todolist/formatter.go') 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{} -- cgit v1.3