allow _ in hashtag

This commit is contained in:
Ted Unangst 2019-09-17 09:56:20 -04:00
parent bef74481c8
commit 9680e472f8
2 changed files with 2 additions and 2 deletions

2
fun.go
View File

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

2
web.go
View File

@ -1479,7 +1479,7 @@ func serve() {
getters.HandleFunc("/"+userSep+"/{name:[[:alnum:]]+}/following", emptiness)
getters.HandleFunc("/a", avatate)
getters.HandleFunc("/o", thelistingoftheontologies)
getters.HandleFunc("/o/{name:[a-z0-9-]+}", showontology)
getters.HandleFunc("/o/{name:[a-z0-9_-]+}", showontology)
getters.HandleFunc("/d/{xid:[[:alnum:].]+}", servefile)
getters.HandleFunc("/emu/{xid:[[:alnum:]_.-]+}", serveemu)
getters.HandleFunc("/meme/{xid:[[:alnum:]_.-]+}", servememe)