Przeglądaj źródła

Merge pull request #930 from tkngaejcpi/develop

support more image formats
develop
Matt Baer 1 miesiąc temu
committed by GitHub
rodzic
commit
9ece6682ef
Nie znaleziono w bazie danych klucza dla tego podpisu ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 1 dodań i 1 usunięć
  1. +1
    -1
      posts.go

+ 1
- 1
posts.go Wyświetl plik

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


Ładowanie…
Anuluj
Zapisz