def METHOD_NAME(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})"