diff options
Diffstat (limited to 'internal/lightgallery/html_renderer.go')
| -rw-r--r-- | internal/lightgallery/html_renderer.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/lightgallery/html_renderer.go b/internal/lightgallery/html_renderer.go index c8c1cf0..8e184e0 100644 --- a/internal/lightgallery/html_renderer.go +++ b/internal/lightgallery/html_renderer.go @@ -60,7 +60,8 @@ func (r *LightGalleryHTMLRenderer) renderLightGallery(w util.BufWriter, source [ for _, img := range gallery.Images { imageUrlSegments := strings.Split(img.URL, ".") imageUrlWithoutExt := strings.Join(imageUrlSegments[:len(imageUrlSegments)-1], ".") - imageNameParts := strings.Split(imageUrlWithoutExt, "-") + imageUrlParts := strings.Split(imageUrlWithoutExt, "/") + imageNameParts := strings.Split(imageUrlParts[len(imageUrlParts)-1], "-") var captionBuf bytes.Buffer captionHTML := img.Caption |