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

Function parseTrixAttachment

internal/htmlutil/htmlutil.go:96–109  ·  view source on GitHub ↗
(n *html.Node)

Source from the content-addressed store, hash-verified

94 alt := getAttr(n, "alt")
95 if alt != "" {
96 fmt.Fprintf(b, "[%s]", alt)
97 } else {
98 b.WriteString("[image]")
99 }
100 return
101 case "action-text-attachment":
102 filename := getAttr(n, "filename")
103 if filename != "" {
104 fmt.Fprintf(b, "\n[%s]\n", filename)
105 }
106 return
107 case "figure":
108 if att := parseTrixAttachment(n); att != nil {
109 if att.Filename != "" {
110 fmt.Fprintf(b, "\n[%s]\n", att.Filename)
111 return
112 }

Callers 2

walkNodeFunction · 0.85
findImagesFunction · 0.85

Calls 1

getAttrFunction · 0.85

Tested by

no test coverage detected