From d6e352b3b4bc9118c2484e51e75283234950364c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Fri, 10 Jun 2022 23:28:12 +0800 Subject: [PATCH] fix: imgfinder format --- plugin/image_finder/keyword.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/plugin/image_finder/keyword.go b/plugin/image_finder/keyword.go index df88ed85..d392a178 100644 --- a/plugin/image_finder/keyword.go +++ b/plugin/image_finder/keyword.go @@ -130,9 +130,13 @@ func printtags(r reflect.Value) string { tag := tags.Index(i) _ = w.WriteByte('#') w.WriteString(tag.Field(0).String()) - w.WriteString(" (") - w.WriteString(tag.Field(1).String()) - w.WriteString(")\n") + if !tag.Field(1).IsZero() { + w.WriteString(" (") + w.WriteString(tag.Field(1).String()) + w.WriteString(")\n") + } else { + w.WriteByte('\n') + } } })) if len(s) > 0 {