all repos — honk @ 4d307f8cbc709541d83b0e593f48532250809189

my fork of honk

sigh. need to defer mentionize to avoid collecting our own html
Ted Unangst tedu@tedunangst.com
Fri, 19 Apr 2019 23:23:22 -0400
commit

4d307f8cbc709541d83b0e593f48532250809189

parent

d76e8ec4c624636dcace9dba7ab31d301da48644

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

jump to
M activity.goactivity.go

@@ -584,7 +584,7 @@ jo["to"] = h.Audience[0]

if len(h.Audience) > 1 { jo["cc"] = h.Audience[1:] } - jo["content"] = h.Noise + jo["content"] = mentionize(h.Noise) jo["summary"] = nil var tags []interface{} g := bunchofgrapes(h.Noise)
M fun.gofun.go

@@ -40,6 +40,7 @@ }

if h.RID != "" && strings.IndexByte(h.RID, '/') == -1 { h.RID = h.Honker + "/h/" + h.RID } + h.Noise = mentionize(h.Noise) } else { idx := strings.LastIndexByte(h.Honker, '/') if idx != -1 {

@@ -177,6 +178,10 @@ }

s = re_link.ReplaceAllStringFunc(s, linkfn) s = strings.Replace(s, "\n", "<br>", -1) + return s +} + +func mentionize(s string) string { s = re_mentions.ReplaceAllStringFunc(s, func(m string) string { where := gofish(m) if where == "" {