1
0
mirror of https://github.com/seqizz/go-tools.git synced 2024-07-18 11:20:18 +02:00

wpmedia2hugo fixed

This commit is contained in:
Gürkan Gür 2017-01-24 13:35:09 +03:00
parent 00558c328a
commit dd8dcdb729

View File

@ -68,7 +68,7 @@ func main() {
}
if len(findContent) != 0 {
wantedContent := findContent[len(findContent)-1]
isImage, _ := regexp.MatchString(".*(gif|jpg|jpeg|png)\\?.*$", wantedContent)
isImage, _ := regexp.MatchString(".*(gif|jpg|jpeg|png)\\??.*$", wantedContent)
if isImage {
re := regexp.MustCompile(".*(gif|jpg|jpeg|png)")
realImg := re.FindString(wantedContent)