mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
fix: memo content snippet
This commit is contained in:
@ -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
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import "google.golang.org/protobuf/encoding/protojson"
|
||||
|
||||
var (
|
||||
protojsonUnmarshaler = protojson.UnmarshalOptions{
|
||||
AllowPartial: true,
|
||||
DiscardUnknown: true,
|
||||
}
|
||||
)
|
||||
|
Reference in New Issue
Block a user