MCPcopy Create free account
hub / github.com/basecamp/hey-cli / ExtractImageURLs

Function ExtractImageURLs

internal/htmlutil/htmlutil.go:29–37  ·  view source on GitHub ↗

ExtractImageURLs finds image URLs from tags and elements.

(s string)

Source from the content-addressed store, hash-verified

27
28// MessageSourceText returns the source-backed text carried by HTML message content.
29func MessageSourceText(s string) string {
30 doc, err := html.Parse(strings.NewReader(s))
31 if err != nil {
32 return ""
33 }
34 var b strings.Builder
35 walkMessageSourceNode(&b, doc, 0)
36 return strings.TrimSpace(b.String())
37}
38
39// PrependHTML adds an HTML note before existing HTML content.
40func PrependHTML(content, note string) string {

Callers 5

extractImageURLsFunction · 0.92
TestExtractImageURLsFunction · 0.85
TestExtractImageURLsNoneFunction · 0.85

Calls 1

findImagesFunction · 0.85

Tested by 4

TestExtractImageURLsFunction · 0.68
TestExtractImageURLsNoneFunction · 0.68