Compare commits
4 commits
1a43693d6a
...
c98dc674d5
| Author | SHA1 | Date | |
|---|---|---|---|
| c98dc674d5 | |||
| de7b46a85d | |||
|
|
50524cade2 | ||
|
|
91db81b44d |
1 changed files with 3 additions and 2 deletions
5
fun.go
5
fun.go
|
|
@ -457,7 +457,7 @@ func memetize(honk *Honk) {
|
||||||
honk.Noise = re_memes.ReplaceAllStringFunc(honk.Noise, repl)
|
honk.Noise = re_memes.ReplaceAllStringFunc(honk.Noise, repl)
|
||||||
}
|
}
|
||||||
|
|
||||||
var re_quickmention = regexp.MustCompile("(^|[ \n])@[[:alnum:]]+([ \n.]|$)")
|
var re_quickmention = regexp.MustCompile("(^|[ \n])@[[:alnum:]]+([ \n.,']|$)")
|
||||||
|
|
||||||
func quickrename(s string, userid int64) string {
|
func quickrename(s string, userid int64) string {
|
||||||
nonstop := true
|
nonstop := true
|
||||||
|
|
@ -472,7 +472,8 @@ func quickrename(s string, userid int64) string {
|
||||||
prefix += "@"
|
prefix += "@"
|
||||||
m = m[1:]
|
m = m[1:]
|
||||||
tail := ""
|
tail := ""
|
||||||
if last := m[len(m)-1]; last == ' ' || last == '\n' || last == '.' {
|
if last := m[len(m)-1]; last == ' ' || last == '\n' ||
|
||||||
|
last == '.' || last == ',' || last == '\'' {
|
||||||
tail = m[len(m)-1:]
|
tail = m[len(m)-1:]
|
||||||
m = m[:len(m)-1]
|
m = m[:len(m)-1]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue