social media crossposting tool. 3rd time's the charm
mastodon misskey crossposting bluesky

fix: don't lowercase tags

zenfyr.dev a333e157 7aca21c2

verified
Changed files
+3 -3
bluesky
mastodon
+2 -2
bluesky/common.py
···
else:
tokens.append(cross.LinkToken(val, label))
elif ttype == 'tag':
-
tokens.append(cross.TagToken(val))
+
tokens.append(cross.TagToken(text[start:end]))
elif ttype == 'mention':
tokens.append(cross.MentionToken(text[start:end], val))
prev = end
···
builder.link(token.label, token.href)
elif isinstance(token, cross.TagToken):
-
builder.tag('#' + token.tag, token.tag)
+
builder.tag('#' + token.tag, token.tag.lower())
else:
# fail on unsupported tokens
return None
+1 -1
mastodon/html_util.py
···
as_tag = anchor_data[1:].lower()
if any(as_tag == block.get('name') for block in tags):
-
self.tokens.append(cross.TagToken(as_tag))
+
self.tokens.append(cross.TagToken(anchor_data[1:]))
elif anchor_data.startswith('@'):
mentions: list[dict] = self.status.get('mentions', [])