Skip to main content

GITHUB_PERMALINK_REGEX

Static GITHUB_PERMALINK_REGEX 

Source
static GITHUB_PERMALINK_REGEX: LazyLock<Regex>
Expand description

Regex pattern for matching GitHub permalink URLs.

Captures: owner, repo, commit, path, and optional line range fragment.

Supported patterns:

  • https://github.com/{owner}/{repo}/blob/{commit}/{path}
  • https://github.com/{owner}/{repo}/blob/{commit}/{path}#L{line}
  • https://github.com/{owner}/{repo}/blob/{commit}/{path}#L{start}-L{end}