From 7f116809cc27a2f761c1a8fca8cd2f5e782ba7df Mon Sep 17 00:00:00 2001 From: aichy Date: Wed, 21 Dec 2022 10:36:18 +0800 Subject: [PATCH] update tag ParsedText --- .goreleaser.yaml | 16 +++++++++++++++- internal/service/tag/tag_service.go | 6 +++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index fd9380ee..18cbbd55 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -39,7 +39,21 @@ builds: goos: - linux goarch: - - arm64 + - arm64 + - id: build-arm7 + main: ./cmd/answer/. + binary: answer + ldflags: -s -w -X main.Version={{.Version}} -X main.Revision={{.ShortCommit}} -X main.Time={{.Date}} -X main.BuildUser=goreleaser + env: + - CC=arm-linux-gnueabihf-gcc + - CXX=arm-linux-gnueabihf-g++ + - AR=arm-linux-gnueabihf-ar + goos: + - linux + goarch: + - arm + goarm: + - 7 - id: build-darwin-arm64 main: ./cmd/answer/. binary: answer diff --git a/internal/service/tag/tag_service.go b/internal/service/tag/tag_service.go index c0bc6aca..1d938eb5 100644 --- a/internal/service/tag/tag_service.go +++ b/internal/service/tag/tag_service.go @@ -320,13 +320,13 @@ func (ts *TagService) GetTagWithPage(ctx context.Context, req *schema.GetTagWith resp := make([]*schema.GetTagPageResp, 0) for _, tag := range tags { - excerpt := htmltext.FetchExcerpt(tag.ParsedText, "...", 240) + //excerpt := htmltext.FetchExcerpt(tag.ParsedText, "...", 240) resp = append(resp, &schema.GetTagPageResp{ TagID: tag.ID, SlugName: tag.SlugName, DisplayName: tag.DisplayName, - OriginalText: excerpt, - ParsedText: excerpt, + OriginalText: tag.OriginalText, + ParsedText: tag.ParsedText, FollowCount: tag.FollowCount, QuestionCount: tag.QuestionCount, IsFollower: ts.checkTagIsFollow(ctx, req.UserID, tag.ID),