package main import "strconv" func figCaptionText(n uint64, caption string) string { base := "[fig." + strconv.FormatUint(n, 10) if caption == "" { return base + "]" } return base + " " + caption + "]" } templ terminalImageComponent(src, alt, caption string, n uint64) {
if src != "" { { } else {
{ "[ no image ]" }
}
{ figCaptionText(n, caption) }
}