Bluesky has no markup: a post is plain text plus facets, byte ranges that carry a link, mention or tag. createRichText in packages/syndicator-bluesky/lib/utils.js calls RichText#detectFacets, which only recognises URLs written out in the text. htmlToStatusText keeps the text of every <a> but drops its href (it appends the last link’s URL to the end of the status as a workaround), so a post like
<p>I like <a href="https://cheese.example">cheese</a>.</p>
reaches Bluesky as “I like cheese. https://cheese.example”, where the word “cheese” is plain text. With two or more links in a post, only the last URL survives at all.
Reproduce: syndicate the post above and fetch the created record: facets holds one link facet, for the trailing URL, none for “cheese”. (A test on @atproto/dev-env’s test network fails on main this way.)
Fix: read the links from the HTML, find each link’s text in the final post text, and add a link facet with the byte range for it, skipping any that overlap a facet Bluesky already detected. Byte offsets, not character offsets, per the richtext guide. The appended last URL is left as it is. PR to follow.
Bluesky has no markup: a post is plain text plus facets, byte ranges that carry a link, mention or tag.
createRichTextinpackages/syndicator-bluesky/lib/utils.jscallsRichText#detectFacets, which only recognises URLs written out in the text.htmlToStatusTextkeeps the text of every<a>but drops itshref(it appends the last link’s URL to the end of the status as a workaround), so a post likereaches Bluesky as “I like cheese. https://cheese.example”, where the word “cheese” is plain text. With two or more links in a post, only the last URL survives at all.
Reproduce: syndicate the post above and fetch the created record:
facetsholds one link facet, for the trailing URL, none for “cheese”. (A test on@atproto/dev-env’s test network fails onmainthis way.)Fix: read the links from the HTML, find each link’s text in the final post text, and add a link facet with the byte range for it, skipping any that overlap a facet Bluesky already detected. Byte offsets, not character offsets, per the richtext guide. The appended last URL is left as it is. PR to follow.