From 5d03fbac6a91df2a8c56373408076c0eab5f3dcd Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Sun, 2 Jul 2023 14:44:52 -0400 Subject: [PATCH] tune up quotes. save the fetched post. --- activity.go | 63 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 39 insertions(+), 24 deletions(-) diff --git a/activity.go b/activity.go index d2653e3..e3e4598 100644 --- a/activity.go +++ b/activity.go @@ -511,36 +511,13 @@ 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:].]+/@[[:alnum:]]+/[[: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_r0malink = regexp.MustCompile(`https://[[:alnum:].]+/objects/[[:alnum:]-]+`) var re_roma1ink = regexp.MustCompile(`https://[[:alnum:].]+/notice/[[:alnum:]]+`) var re_qtlinks = regexp.MustCompile(`>https://[^\s<]+<`) -func qutify(user *WhatAbout, content string) string { - // well this is gross - malcontent := strings.ReplaceAll(content, ``, "") - malcontent = strings.ReplaceAll(malcontent, ``, "") + malcontent = strings.ReplaceAll(malcontent, `