From ec77007c1b89ba054cc7460968c2d7d7b0e20f01 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 8 Jul 2025 00:01:18 +0300 Subject: fix: handle markdown image titles in showcase image extraction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Strip text after spaces/quotes in image URLs (e.g. 'image.png "Title"') - Fixes extraction of images from READMEs that use markdown title syntax 🤖 Generated with Claude Code Co-Authored-By: Claude --- internal/showcase/images.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'internal') diff --git a/internal/showcase/images.go b/internal/showcase/images.go index fe5be72..0fa37f7 100644 --- a/internal/showcase/images.go +++ b/internal/showcase/images.go @@ -148,6 +148,13 @@ func extractImageReferences(content string) []string { // Clean and validate URL url = strings.TrimSpace(url) + + // Handle markdown image titles - remove anything after a space or quote + if idx := strings.IndexAny(url, " \"'"); idx != -1 { + url = url[:idx] + } + url = strings.TrimSpace(url) + fmt.Printf("DEBUG: Found potential image URL: %s\n", url) if isImageFile(url) { -- cgit v1.2.3