Permalink
Browse files

Extract images with .image extension

  • Loading branch information...
thebaer committed Dec 31, 2018
1 parent 3ae45bc commit 8a07c0f0a0093c12d558e5f4a71208690cde7e51
Showing with 1 addition and 1 deletion.
  1. +1 −1 posts.go
@@ -1365,7 +1365,7 @@ func (rp *RawPost) Created8601() string {
return rp.Created.Format("2006-01-02T15:04:05Z")
}

var imageURLRegex = regexp.MustCompile(`(?i)^https?:\/\/[^ ]*\.(gif|png|jpg|jpeg)$`)
var imageURLRegex = regexp.MustCompile(`(?i)^https?:\/\/[^ ]*\.(gif|png|jpg|jpeg|image)$`)

func (p *Post) extractImages() {
matches := extract.ExtractUrls(p.Content)

0 comments on commit 8a07c0f

Please sign in to comment.