MCPcopy Create free account
hub / github.com/PaddlePaddle/PaddleOCR / _compile_link_pattern

Function _compile_link_pattern

tools/check_docs_github_links.py:15–20  ·  view source on GitHub ↗
(repo_slug)

Source from the content-addressed store, hash-verified

13
14
15def _compile_link_pattern(repo_slug):
16 escaped_repo = re.escape(repo_slug)
17 return re.compile(
18 rf"https://github\.com/{escaped_repo}/(?:blob|tree)/(?P<ref>[^/\s)\]\"&#x27;<>]+)"
19 rf"(?P<rest>/[^\s)\]\"&#x27;<>]*)?"
20 )
21
22
23def find_forbidden_links(root, repo_slug, forbidden_refs):

Callers 1

find_forbidden_linksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected