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

fix: links with labels

zenfyr.dev b93de3de be34f50b

verified
Changed files
+7 -4
bluesky
+7 -4
bluesky/common.py
···
label = decode(ut8_text[start:end])
# try to unflatten links
-
split = val.split('://')
+
split = val.split('://', 1)
if len(split) > 1:
if split[1].startswith(label):
tokens.append(cross.LinkToken(val, ''))
-
elif label.endswith('...') and split[1].startswith(label[:-3]):
+
continue
+
+
if label.endswith('...') and split[1].startswith(label[:-3]):
tokens.append(cross.LinkToken(val, ''))
-
else:
-
tokens.append(cross.LinkToken(val, label))
+
continue
+
+
tokens.append(cross.LinkToken(val, label))
case 'tag':
tokens.append(cross.TagToken(decode(ut8_text[start:end])))
case 'mention':