def METHOD_NAME(src_path):
    def _replace(match):
        text = match.group("text")
        url = match.group("url")
        if not url.startswith("http"):
            url_rel_to_repo_base = os.path.relpath(
                os.path.abspath(os.path.join(src_path, os.path.pardir, url)), _REPO_BASE
            )
            url = f"{GITHUB_REPO}/{url_rel_to_repo_base}"
        return f"{text}({url})"
    return _replace