Compare commits
3 commits
c98dc674d5
...
1a43693d6a
| Author | SHA1 | Date | |
|---|---|---|---|
| 1a43693d6a | |||
| 17ca2738d1 | |||
| 4bfc0a67e4 |
1 changed files with 2 additions and 3 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,8 +472,7 @@ 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' ||
|
if last := m[len(m)-1]; last == ' ' || last == '\n' || last == '.' {
|
||||||
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