You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I go to edit the current version of https://federate.social/@jik/112391392864473951 in the Mastodon web app, it says I have one free character. When I go to edit exactly the same post in Tusky Test 25.0-ad1afdd2, it says the post is 71 characters too long immediately when I start editing it.
My Mastodon server is running version 4.2.8.
Steps to reproduce the problem
Edit a post. I suspect the problem is the links, but that's just a guess, so edit a post with links.
Observe how the length shown in Tusky is different from the length shown when you edit the post in the Mastodon web app.
Debug information
Tusky Test 25.0-ad1afdd2
Google Pixel 8
Android version: 14
SDK version: 34
The text was updated successfully, but these errors were encountered:
At first I thought simply changing the regex might help, but then I
found more and more differences between Mastodon and Tusky, so I decided
to reimplement the thing. I added 74 testcases that I all compared to
Mastodon to make sure they are correct.
On an Fairphone 4 the new implementation is faster, on an Samsung Galaxy
Tab S3 slower.
Testcases for the benchmark:
```
test of a status with #one hashtag http
```
```
test
http:// #hashtag https://connyduck.at/http://example.org
this is a #test
and this is a @mention@test.com @test@test@test456@test.com
```
```
@mention@test.social Just your ordinary mention with a hashtag
#test
```
```
@mention@test.social Just your ordinary mention with a url
https://riot.im/app/#/room/#Tusky:matrix.org
```
FP4:
```
11.159 ns 15 allocs Benchmark.new_1
119.701 ns 43 allocs Benchmark.new_2
21.895 ns 24 allocs Benchmark.new_3
87.512 ns 32 allocs Benchmark.new_4
16.592 ns 46 allocs Benchmark.old_1
134.381 ns 169 allocs Benchmark.old_2
28.355 ns 68 allocs Benchmark.old_3
45.221 ns 77 allocs Benchmark.old_4
```
SGT3:
```
43,785 ns 18 allocs Benchmark.new_1
446,074 ns 43 allocs Benchmark.new_2
78,802 ns 26 allocs Benchmark.new_3
315,478 ns 32 allocs Benchmark.new_4
42,186 ns 45 allocs Benchmark.old_1
353,570 ns 157 allocs Benchmark.old_2
72,376 ns 66 allocs Benchmark.old_3
122,985 ns 74 allocs Benchmark.old_4
```
benchmark code is here: https://github.com/tuskyapp/tusky-span-benchmarkcloses#4425
Detailed description
When I go to edit the current version of https://federate.social/@jik/112391392864473951 in the Mastodon web app, it says I have one free character. When I go to edit exactly the same post in Tusky Test 25.0-ad1afdd2, it says the post is 71 characters too long immediately when I start editing it.
My Mastodon server is running version 4.2.8.
Steps to reproduce the problem
Debug information
Tusky Test 25.0-ad1afdd2
Google Pixel 8
Android version: 14
SDK version: 34
The text was updated successfully, but these errors were encountered: