mirror of
https://github.com/pachli/pachli-android.git
synced 2024-12-14 18:15:13 +01:00
2a4126a542
Previous code used custom regular expressions to extract URLs, hashtags, and mentions from text while the user was writing a post. These were inconsistent with the ones that Mastodon uses so the derived character count could be wrong. As well as being visually incorrect this could prevent the user from posting a status that was within the length limit, or allow them to attempt to post a status that was over the length limit (which would then fail). Fix this by dropping the homegrown regular expressions and using the same text parsing library that Mastodon users; twitter-text. This has been converted to Kotlin and the functionality related to Twitter specific features has been removed. The hashtag handling has been adjusted, as Mastodon is more permissive about the positions where hashtags can appear than Twitter is, in particular, a hashtag does not need to be preceded with whitespace if the tag appears after some scripts, such as Hirigana. |
||
---|---|---|
.. | ||
libraries | ||
licenses |