don't include leading space in hashtag
This commit is contained in:
parent
507e4b6c6b
commit
fc67125854
5
fun.go
5
fun.go
|
@ -123,6 +123,11 @@ var re_hashes = regexp.MustCompile(`(?:^|\W)#[[:alnum:]]+`)
|
||||||
|
|
||||||
func ontologies(s string) []string {
|
func ontologies(s string) []string {
|
||||||
m := re_hashes.FindAllString(s, -1)
|
m := re_hashes.FindAllString(s, -1)
|
||||||
|
for i, h := range m {
|
||||||
|
if h[0] != '#' {
|
||||||
|
m[i] = h[1:]
|
||||||
|
}
|
||||||
|
}
|
||||||
return m
|
return m
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue