Skip to content

Commit

Permalink
fix: memo content snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
boojack committed Jul 16, 2024
1 parent 7c9f967 commit 446e38f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 0 additions & 3 deletions server/router/api/v1/memo_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -1301,8 +1301,5 @@ func getMemoContentSnippet(content string) (string, error) {
}

plainText := renderer.NewStringRenderer().Render(nodes)
if len(plainText) > 100 {
return plainText[:100] + "...", nil
}
return plainText, nil
}
1 change: 1 addition & 0 deletions store/db/mysql/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import "google.golang.org/protobuf/encoding/protojson"

var (
protojsonUnmarshaler = protojson.UnmarshalOptions{
AllowPartial: true,
DiscardUnknown: true,
}
)

0 comments on commit 446e38f

Please sign in to comment.