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:
136136 if text .startswith ("www." ):
137137 text = text [4 :]
138138
139+ # Remove @ if present
140+ if text .startswith ("@" ):
141+ text = text [1 :]
142+
139143 for marker in ("bsky.app/profile/" , "bsky/" ):
140144 if marker in text :
141145 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:
3838 ("input_string" , "result" ),
3939 [
4040 ("username" , "https://bsky.app/profile/username.bsky.social" ),
41+ ("@username" , "https://bsky.app/profile/username.bsky.social" ),
4142 ("username.dev" , "https://bsky.app/profile/username.dev" ),
43+ ("@username.dev" , "https://bsky.app/profile/username.dev" ),
4244 ("username.bsky.social" , "https://bsky.app/profile/username.bsky.social" ),
4345 ("bsky.app/profile/username" , "https://bsky.app/profile/username.bsky.social" ),
4446 ("bsky/username" , "https://bsky.app/profile/username.bsky.social" ),
You can’t perform that action at this time.
0 commit comments