handle case where hahstag begins a newline

This commit is contained in:
Ted Unangst 2019-11-12 19:03:48 -05:00
parent 5ccc483e66
commit 65af1f4ac3
1 changed files with 1 additions and 1 deletions

2
fun.go
View File

@ -258,7 +258,7 @@ func xfiltrate() string {
return xcelerate(b[:]) return xcelerate(b[:])
} }
var re_hashes = regexp.MustCompile(`(?:^| )#[[:alnum:]]*[[:alpha:]][[:alnum:]_-]*`) var re_hashes = regexp.MustCompile(`(?:^| |>)#[[:alnum:]]*[[:alpha:]][[:alnum:]_-]*`)
func ontologies(s string) []string { func ontologies(s string) []string {
m := re_hashes.FindAllString(s, -1) m := re_hashes.FindAllString(s, -1)