I'm surprised Nostr doesn't have something universal yet for:
A javascript library that renders an event’s content. It can replace mentions, convert links to http, markup hashtags, render images, embed media like YouTube, twitch, etc, and maybe even embed a reference Nostr event. It could support stripping out unsafe javascript too. Similar to a markdown to HTML render library.
Is the render code standalone, or internal to C?
It's internal, but could be pulled out. The problem I think is that it's hard to disentangle what is specific to a client vs what can be shared. For example coracle's embeds use coracle's badge generation, fonts, colors, borders, etc. Component libraries that are fully customizable are a lot of work.
Thread collapsed
Now, that said, I do have a parsing function now that could be very useful, as it simply returns an array of classified note parts.
Thread collapsed