make tag support other language

This commit is contained in:
linchen2chris 2023-02-21 19:10:11 +08:00
parent acd8b842b6
commit 1dcadee27e

View file

@ -31,7 +31,7 @@ type Headline struct {
}
var headlineRegexp = regexp.MustCompile(`^([*]+)\s+(.*)`)
var tagRegexp = regexp.MustCompile(`(.*?)\s+(:[A-Za-z0-9_@#%:]+:\s*$)`)
var tagRegexp = regexp.MustCompile(`(.*?)\s+(:[\p{L}0-9_@#%:]+:\s*$)`)
func lexHeadline(line string) (token, bool) {
if m := headlineRegexp.FindStringSubmatch(line); m != nil {