handle case where hahstag begins a newline

master
Ted Unangst 5 years ago
parent 5ccc483e66
commit 65af1f4ac3

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

Loading…
Cancel
Save