mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-29 22:26:15 -06:00
Allow marks after NFC normalization
Includes regression test for the Tamil example from #3618
This commit is contained in:
parent
726d2ba483
commit
13a2573ca2
5 changed files with 29 additions and 22 deletions
|
|
@ -170,8 +170,11 @@ func (suite *PlainTestSuite) TestDeriveMultiple() {
|
|||
func (suite *PlainTestSuite) TestZalgoHashtag() {
|
||||
statusText := `yo who else loves #praying to #z̸͉̅a̸͚͋l̵͈̊g̸̫͌ỏ̷̪?`
|
||||
f := suite.FromPlain(statusText)
|
||||
suite.Len(f.Tags, 1)
|
||||
suite.Equal("praying", f.Tags[0].Name)
|
||||
if suite.Len(f.Tags, 2) {
|
||||
suite.Equal("praying", f.Tags[0].Name)
|
||||
// NFC doesn't do much for Zalgo text, but it's difficult to strip marks without affecting non-Latin text.
|
||||
suite.Equal("z̸͉̅a̸͚͋l̵͈̊g̸̫͌ỏ̷̪", f.Tags[1].Name)
|
||||
}
|
||||
}
|
||||
|
||||
func TestPlainTestSuite(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue