From 05746b1a9dace29bf6d8eee03298924096262540 Mon Sep 17 00:00:00 2001 From: zu1k Date: Fri, 24 Nov 2023 16:18:06 +0800 Subject: [PATCH] fix: Query error causes idx not updated --- pkg/entity/parse.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/entity/parse.go b/pkg/entity/parse.go index f6827d7..a84a1c1 100644 --- a/pkg/entity/parse.go +++ b/pkg/entity/parse.go @@ -60,9 +60,11 @@ func ParseLine(line string) Entities { e.InfoText = res.String() e.Info = res.Result e.Source = res.Source - es = append(es, e) - idx = e.Loc[1] + } else { + e.Type = TypePlain } + idx = e.Loc[1] + es = append(es, e) } } if total := len(line); idx < total {