Uh, some invisible `<span>` elements are included at the end of the HTML content of a Status.... which means the link at the end of a post we see on Elk, is not the last child ?
The parse function seems not the best place as it is recursively going through node children... and I'm only concerned about the "last" not invisible child. ?
Found that the preview card object generated by Mastodon is ALWAYS for the first link if there are multiple links in a post. This saves us work ? because the last link is never going to match the preview URL, and won't trigger the clean up logic
stuff to note: 1. we check if preview card URL matches the shared link href attribute 2. we don't need to check for multiple links, because the last link will never match the preview URL in this scenario 3. we append the cleaned link to the preview card "provider name" so people will still find this info --> meaning, we don't actually remove anything, but instead move it into the preview card
Elk coding later :) How do people feel about cleaning up links at the end of the post when there's already a preview card? https://github.com/elk-zone/elk/pull/982
@elk Elk gives a ton of value to a lot of people. It pushes the whole decentralized social platform movement forward, and I see that as extremely liberating after years of being dampened by big tech centralized platforms that monetize people's data. I bet a lot of people recognize this too, I think @elk is really in the center of something bigger. The project is all history in the making.