File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ def extract_linkedin_url(text: str) -> str:
105105 """
106106 if text .startswith ("in/" ):
107107 linkedin_url = f"https://linkedin.com/{ text } "
108- elif not text .startswith (("https://" , "http://" , "www." )):
108+ elif not text .startswith (("https://" , "http://" , "www." , "linkedin." )):
109109 linkedin_url = f"https://linkedin.com/in/{ text } "
110110 else :
111111 linkedin_url = (
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ def test_extract_mastodon_url(input_string: str, result: str) -> None:
2323 ("input_string" , "result" ),
2424 [
2525 ("username" , "https://linkedin.com/in/username" ),
26+ ("linkedin.com/in/username" , "https://linkedin.com/in/username" ),
2627 ("in/username" , "https://linkedin.com/in/username" ),
2728 ("www.linkedin.com/in/username" , "https://www.linkedin.com/in/username" ),
2829 ("http://linkedin.com/in/username" , "https://linkedin.com/in/username" ),
You can’t perform that action at this time.
0 commit comments