all repos — honk @ ca0919497e295ad1658e6f6289519889a8f9b7ca

my fork of honk

quick mention should allow trailing .
Ted Unangst tedu@tedunangst.com
Fri, 29 Nov 2019 14:53:25 -0500
commit

ca0919497e295ad1658e6f6289519889a8f9b7ca

parent

c4469d15aec8d6617004e9d8dce6630533025282

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M fun.gofun.go

@@ -374,7 +374,7 @@ }

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 { nonstop := true

@@ -389,7 +389,7 @@ }

prefix += "@" m = m[1:] tail := "" - if m[len(m)-1] == ' ' || m[len(m)-1] == '\n' { + if last := m[len(m)-1]; last == ' ' || last == '\n' || last == '.' { tail = m[len(m)-1:] m = m[:len(m)-1] }