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

fix: skip character when parsing tag and mention facet

zenfyr.dev 0ff06c91 3014455c

verified
Changed files
+4 -2
bluesky
+4 -2
bluesky/common.py
···
tokens.append(cross.LinkToken(val, label))
case 'tag':
-
tokens.append(cross.TagToken(decode(ut8_text[start:end])))
+
tag = decode(ut8_text[start:end])
+
tokens.append(cross.TagToken(tag[1:] if tag.startswith('#') else tag))
case 'mention':
-
tokens.append(cross.MentionToken(decode(ut8_text[start:end]), val))
+
mention = decode(ut8_text[start:end])
+
tokens.append(cross.MentionToken(mention[1:] if mention.startswith('@') else mention, val))
prev = end
if prev < len(ut8_text):