all repos — honk @ f9d234ac480e4d5b7f86d64c01cee431c2e0087e

my fork of honk

add back missing @https mentions
Ted Unangst tedu@tedunangst.com
Sat, 17 Feb 2024 19:40:33 -0500
commit

f9d234ac480e4d5b7f86d64c01cee431c2e0087e

parent

f2d32758d5d8f567a2bc2524bb18cd3249570663

3 files changed, 13 insertions(+), 5 deletions(-)

jump to
M fun.gofun.go

@@ -406,9 +406,14 @@

func bunchofgrapes(m []string) []Mention { var mentions []Mention for i := range m { - where := gofish(m[i]) + who := m[i] + if strings.HasPrefix(who, "@https://") { + mentions = append(mentions, Mention{Who: who, Where: who[1:]}) + continue + } + where := gofish(who) if where != "" { - mentions = append(mentions, Mention{Who: m[i], Where: where}) + mentions = append(mentions, Mention{Who: who, Where: where}) } } return mentions

@@ -586,6 +591,9 @@ }

func attoreplacer(m string) string { fill := `<span class="h-card"><a class="u-url mention" href="%s">%s</a></span>` + if strings.HasPrefix(m, "@https://") { + return fmt.Sprintf(fill, html.EscapeString(m[1:]), html.EscapeString(m)) + } where := gofish(m) if where == "" { return m
M go.modgo.mod

@@ -9,7 +9,7 @@ golang.org/x/crypto v0.16.0

golang.org/x/net v0.19.0 humungus.tedunangst.com/r/go-sqlite3 v1.1.3 humungus.tedunangst.com/r/gonix v0.1.4 - humungus.tedunangst.com/r/webs v0.7.9 + humungus.tedunangst.com/r/webs v0.7.10 ) require (
M go.sumgo.sum

@@ -17,5 +17,5 @@ humungus.tedunangst.com/r/go-sqlite3 v1.1.3 h1:G2N4wzDS0NbuvrZtQJhh4F+3X+s7BF8b9ga8k38geUI=

humungus.tedunangst.com/r/go-sqlite3 v1.1.3/go.mod h1:FtEEmQM7U2Ey1TuEEOyY1BmphTZnmiEjPsNLEAkpf/M= humungus.tedunangst.com/r/gonix v0.1.4 h1:FuvWYQlFIzmfHxfvIfq5SYpSiHhFcpJqq3pi+w45s78= humungus.tedunangst.com/r/gonix v0.1.4/go.mod h1:VFBc2bPDXr1ayHOmHUutxYu8fSM+pkwK8o36h4rkORg= -humungus.tedunangst.com/r/webs v0.7.9 h1:LC9o2F9joAcf4SxWaRFs5ZqXHSbzdfre9/9BY0gcM0w= -humungus.tedunangst.com/r/webs v0.7.9/go.mod h1:ylhqHSPI0Oi7b4nsnx5mSO7AjLXN7wFpEHayLfN/ugk= +humungus.tedunangst.com/r/webs v0.7.10 h1:DPEsA7DU1P1uOBWYrhJWjqDtll6SGJkWQtJ/2N6P8DI= +humungus.tedunangst.com/r/webs v0.7.10/go.mod h1:ylhqHSPI0Oi7b4nsnx5mSO7AjLXN7wFpEHayLfN/ugk=