Comments (3)
It's the links (as you mentioned), on mastodon every link counts as a static length (on .social it's 23). Not sure what's the best way to do it, running a regex against the content on keypress?
edit:
will have to see if it's worth it performance-wise to check if the content has /
or/and .
before running the regex
from tuba.
Hmm, this is messier than expected... Mastodon apparently also ignores the domain part of the mentions [at]mastodon[at]mastodon.social counts as [at]mastodon. Needs more investigation on other backends
MENTION REGEX:
https://github.com/mastodon/mastodon/blob/774e1189d26fffd914107a4236f6287043c988f8/app/services/account_search_service.rb#L6
from tuba.
on further research, every client just does its own thing at this point...
Mastodon has a very specialized regex that's provided from an npm package that was maintained by twitter. That regex includes every valid TLD. https://google.com will match but https://google.foobar won't. Mastodon will count it as the defined amount of characters even if it has less (https://a.com/ will be counted as 23 even if it has less chars)
elk mistook (?) another regex for the url one so it counts any string that starts with https or xmpp (<- mastodon doesnt shorten xmpp uris). It also only sets the value to the defined one (23) if it's longer than that (https://a.com will count as 13)
I don't think we can have such a specialized regex as mastodon's but at least one close to it
from tuba.
Related Issues (20)
- [Request]: Plurals for date and time translations HOT 4
- [Bug]: post view does not scale with font size
- [Request]: Dim post text in notifications for boosts/favs to your own posts
- [Request]: Send quote posts HOT 1
- [Bug]: Tuba doesn't show lists from Mastodon Glitch HOT 4
- [Bug]: Using autocomplete to add a handle to the end of a non-last line removes the next line break
- [Bug]: webp images do not load HOT 4
- [Bug]: Notifications and Conversations stay selected in the sidebar HOT 2
- Someone messed up the French translation file HOT 6
- [Request]: beta testing (for translators) HOT 3
- [Bug]: The window can be resized to hide UI elements HOT 3
- [Bug]: Missing "back" button in portrait / mobile mode HOT 1
- [RFC] ListBox performance alternative
- [Bug]: zoom keys work only from alphanumeric block, and only with NumLock off HOT 2
- [Request]: Zoom media via ctrl + mouse wheel
- [Bug]: The "avatar" button occurs twice in tab cycling, only one resulting in a functional menu
- [Bug]: Unauthorized, token not supplied HOT 6
- [Bug]: Headerbar conditions regression
- [Bug]: Text doesn't follow GNOME HIG title case HOT 3
- [Request]: Scheduled posts HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tuba.