浏览代码

support more image formats

pull/930/head
Riley Chang 2 个月前
父节点
当前提交
83ffea7fa0
找不到此签名对应的密钥 GPG 密钥 ID: B27161E90325DD57
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      posts.go

+ 1
- 1
posts.go 查看文件

@@ -1669,7 +1669,7 @@ func (rp *RawPost) Updated8601() string {
return rp.Updated.Format("2006-01-02T15:04:05Z")
}

var imageURLRegex = regexp.MustCompile(`(?i)[^ ]+\.(gif|png|jpg|jpeg|image)$`)
var imageURLRegex = regexp.MustCompile(`(?i)[^ ]+\.(gif|png|jpg|jpeg|avif|avifs|webp|jxl|image)$`)

func (p *Post) extractImages() {
p.Images = extractImages(p.Content)


正在加载...
取消
保存