[MM-29224] Fix bug where markdown image link doesn't show preview (#15862)

* Fix bug where markdown image has no preview

* go fmt

* Fix failing test

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
camgraff
2020-10-14 07:36:46 -05:00
коммит произвёл GitHub
родитель fa9279a675
Коммит 07948ae7bc
2 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@@ -316,6 +316,10 @@ func getFirstLinkAndImages(str string) (string, []string) {
if firstLink == "" {
firstLink = v.Destination()
}
case *markdown.InlineLink:
if firstLink == "" {
firstLink = v.Destination()
}
case *markdown.InlineImage:
images = append(images, v.Destination())
case *markdown.ReferenceImage: