Email or username:

Password:

Forgot your password?
dansup

A complicated aspect of Loops is captions.

The challenging thing with toots or captions is that they can contain hashtags, mentions and urls.

That's fine, until you're building a mobile app and need to handle these links differently.

Instead of complicated regexes, I'm going to copy Bluesky and use token indices.

This will allow us to normalize these entities while allowing spaces in hashtags and mentions at the backend level, because RN doesn't have full regex support.

#loops #loopsDev

4 comments
Emelia πŸ‘ΈπŸ»

@dansup I'd like to see a FEP expanding Tag objects to include indices within the Content for those tags, if they are in the content. Parsing HTML here sucks

Emelia πŸ‘ΈπŸ»

@dansup like, I know twitter used to ship just the HTML or plaintext to the client, but they switched to indices because it made building apps SO much easier. No more complicated REGEXs

dansup

@thisismissem Yeah that really does matter when building apps, and with Loops I have the ability to ship support and really have a thorough implementation for our caption rendering!

Go Up