(text: str, needle: str)
| 531 | return path.stem |
| 532 | |
| 533 | |
| 534 | def _first_matching_url(text: str, needle: str) -> str: |
| 535 | pattern = re.compile(r"https?://[^\s)>\]]+", flags=re.IGNORECASE) |
| 536 | for match in pattern.findall(text or ""): |
| 537 | if needle.lower() in match.lower(): |
| 538 | return match.rstrip(".,") |
| 539 | return "" |
| 540 | |
| 541 |
no outgoing calls
no test coverage detected