all repos — honk @ 046641fedd0e4eb6112cf0b59d1ec34530bc5d5c

my fork of honk

more masto stompage
Ted Unangst tedu@tedunangst.com
Tue, 24 Jan 2023 17:19:25 -0500
commit

046641fedd0e4eb6112cf0b59d1ec34530bc5d5c

parent

ef1c1ed4808cbd3bea43ca3c7ce92b84ff3cdc71

1 files changed, 4 insertions(+), 3 deletions(-)

jump to
M activity.goactivity.go

@@ -508,7 +508,7 @@ return ""

} var re_mast0link = regexp.MustCompile(`https://[[:alnum:].]+/users/[[:alnum:]]+/statuses/[[:digit:]]+`) -var re_masto1ink = regexp.MustCompile(`https://[[:alnum:].]+/users/[[:alnum:]]+/statuses/[[:digit:]]+`) +var re_masto1ink = regexp.MustCompile(`https://[[:alnum:].]+/@[[:alnum:]]+/[[:digit:]]+`) var re_misslink = regexp.MustCompile(`https://[[:alnum:].]+/notes/[[:alnum:]]+`) var re_honklink = regexp.MustCompile(`https://[[:alnum:].]+/u/[[:alnum:]]+/h/[[:alnum:]]+`) var re_romalink = regexp.MustCompile(`https://[[:alnum:].]+/objects/[[:alnum:]-]+`)

@@ -516,8 +516,9 @@ var re_qtlinks = regexp.MustCompile(`>https://[^\s<]+<`)

func qutify(user *WhatAbout, content string) string { // well this is gross - content = strings.ReplaceAll(content, `</span><span class="ellipsis">`, "") - mlinks := re_qtlinks.FindAllString(content, -1) + malcontent := strings.ReplaceAll(content, `</span><span class="ellipsis">`, "") + malcontent = strings.ReplaceAll(malcontent, `</span><span class="invisible">`, "") + mlinks := re_qtlinks.FindAllString(malcontent, -1) for _, m := range mlinks { m = m[1 : len(m)-1] dlog.Printf("consider qt: %s", m)