chore: don't allow selection of symbol tokens (#3589)

This commit is contained in:
ggurdin 2025-07-30 16:38:57 -04:00 committed by GitHub
parent a7054f25a5
commit ff250e2d7f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -157,7 +157,7 @@ class HtmlMessage extends StatelessWidget {
pangeaMessageEvent?.messageDisplayRepresentation?.tokens
?.where(
(t) =>
t.pos != "PUNCT" &&
!["PUNCT", "SYM"].contains(t.pos) &&
!t.lemma.text.contains(RegExp(r'[0-9]')) &&
t.lemma.text.length <= 50,
)