From 953957567875e0321be62ffdc26bcf49738155d2 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Tue, 24 Jan 2023 17:19:25 -0500 Subject: [PATCH] more masto stompage --- activity.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/activity.go b/activity.go index 8cd8772..f02f43c 100644 --- a/activity.go +++ b/activity.go @@ -508,7 +508,7 @@ func firstofmany(obj junk.Junk, key string) string { } 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, ``, "") - mlinks := re_qtlinks.FindAllString(content, -1) + malcontent := strings.ReplaceAll(content, ``, "") + malcontent = strings.ReplaceAll(malcontent, `