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

fix: links with labels

zenfyr.dev b93de3de be34f50b

verified
+7 -4
+7 -4
bluesky/common.py
··· 123 123 label = decode(ut8_text[start:end]) 124 124 125 125 # try to unflatten links 126 - split = val.split('://') 126 + split = val.split('://', 1) 127 127 if len(split) > 1: 128 128 if split[1].startswith(label): 129 129 tokens.append(cross.LinkToken(val, '')) 130 - elif label.endswith('...') and split[1].startswith(label[:-3]): 130 + continue 131 + 132 + if label.endswith('...') and split[1].startswith(label[:-3]): 131 133 tokens.append(cross.LinkToken(val, '')) 132 - else: 133 - tokens.append(cross.LinkToken(val, label)) 134 + continue 135 + 136 + tokens.append(cross.LinkToken(val, label)) 134 137 case 'tag': 135 138 tokens.append(cross.TagToken(decode(ut8_text[start:end]))) 136 139 case 'mention':