Sfoglia il codice sorgente

support more image formats

pull/930/head
Riley Chang 2 mesi fa
parent
commit
83ffea7fa0
Non sono state trovate chiavi note per questa firma nel database ID Chiave GPG: B27161E90325DD57
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. +1
    -1
      posts.go

+ 1
- 1
posts.go Vedi File

@@ -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)


Caricamento…
Annulla
Salva