From 58f7dcdaf946f928108b40135e26f1a4e6affc26 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Sat, 24 Jan 2026 19:13:58 +0000 Subject: [PATCH] fix(biography): make status.icon optional in resume-biography block Add explicit type checking and proper trimming for status icon extraction to match the more robust pattern used in resume-biography-3. Fixes issue where users couldn't omit the emoji status badge. --- modules/blox/blox/resume-biography-3/block.html | 2 +- modules/blox/blox/resume-biography/block.html | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/blox/blox/resume-biography-3/block.html b/modules/blox/blox/resume-biography-3/block.html index 32da642a..eb197f7b 100644 --- a/modules/blox/blox/resume-biography-3/block.html +++ b/modules/blox/blox/resume-biography-3/block.html @@ -166,7 +166,7 @@ {{ if and $status (reflect.IsMap $status) }} {{ $status_icon_raw := index $status "icon" }} {{ if eq (printf "%T" $status_icon_raw) "string" }} - {{ $status_icon = $status_icon_raw }} + {{ $status_icon = strings.TrimSpace $status_icon_raw }} {{ end }} {{ end }} diff --git a/modules/blox/blox/resume-biography/block.html b/modules/blox/blox/resume-biography/block.html index 6aa444c3..26701434 100644 --- a/modules/blox/blox/resume-biography/block.html +++ b/modules/blox/blox/resume-biography/block.html @@ -163,7 +163,10 @@ {{ $status_icon := "" }} {{ with $profile.status }} {{ if reflect.IsMap . }} - {{ with index . "icon" }}{{ $status_icon = strings.TrimSpace (printf "%v" .) }}{{ end }} + {{ $icon_raw := index . "icon" }} + {{ if eq (printf "%T" $icon_raw) "string" }} + {{ $status_icon = strings.TrimSpace $icon_raw }} + {{ end }} {{ end }} {{ end }}