aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
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++ {