aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorFChannel <>2021-07-25 17:35:41 -0700
committerFChannel <>2021-07-25 17:35:41 -0700
commit87fc54c9d41bdbe7eaa8769386776a3723580b34 (patch)
tree208bef1d292eb7aa58b44c7389bd9ed47b61d1fd /main.go
parent6846150cb48d080112981633d6dddabef5ce4439 (diff)
showing post replies bug fix
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/main.go b/main.go
index f5b8613..17ed9d1 100644
--- a/main.go
+++ b/main.go
@@ -1737,7 +1737,7 @@ func CreateAttachmentObject(file multipart.File, header *multipart.FileHeader) (
func ParseCommentForReplies(db *sql.DB, comment string, op string) []ObjectBase {
- re := regexp.MustCompile(`(>>https?://[A-Za-z0-9_.\-~]+\/[A-Za-z0-9_.\-~]+\/\w+)`)
+ re := regexp.MustCompile(`(>>(https?://[A-Za-z0-9_.:\-~]+\/[A-Za-z0-9_.\-~]+\/)(f[A-Za-z0-9_.\-~]+-)?([A-Za-z0-9_.\-~]+)?#?([A-Za-z0-9_.\-~]+)?)`)
match := re.FindAllStringSubmatch(comment, -1)
var links []string
@@ -2410,9 +2410,9 @@ func UpdateObjectWithPreview(db *sql.DB, id string, preview string) {
func ParseCommentForReply(comment string) string {
- re := regexp.MustCompile("(>>)(https://|http://)?(www\\.)?.+\\/\\w+")
+ re := regexp.MustCompile(`(>>(https?://[A-Za-z0-9_.:\-~]+\/[A-Za-z0-9_.\-~]+\/)(f[A-Za-z0-9_.\-~]+-)?([A-Za-z0-9_.\-~]+)?#?([A-Za-z0-9_.\-~]+)?)`)
match := re.FindAllStringSubmatch(comment, -1)
-
+
var links []string
for i:= 0; i < len(match); i++ {