File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,10 @@ def extract_bluesky_url(text: str) -> str:
136
136
if text .startswith ("www." ):
137
137
text = text [4 :]
138
138
139
+ # Remove @ if present
140
+ if text .startswith ("@" ):
141
+ text = text [1 :]
142
+
139
143
for marker in ("bsky.app/profile/" , "bsky/" ):
140
144
if marker in text :
141
145
text = text .split (marker , 1 )[1 ]
Original file line number Diff line number Diff line change @@ -38,7 +38,9 @@ def test_extract_linkedin_url(input_string: str, result: str) -> None:
38
38
("input_string" , "result" ),
39
39
[
40
40
("username" , "https://bsky.app/profile/username.bsky.social" ),
41
+ ("@username" , "https://bsky.app/profile/username.bsky.social" ),
41
42
("username.dev" , "https://bsky.app/profile/username.dev" ),
43
+ ("@username.dev" , "https://bsky.app/profile/username.dev" ),
42
44
("username.bsky.social" , "https://bsky.app/profile/username.bsky.social" ),
43
45
("bsky.app/profile/username" , "https://bsky.app/profile/username.bsky.social" ),
44
46
("bsky/username" , "https://bsky.app/profile/username.bsky.social" ),
You can’t perform that action at this time.
0 commit comments