Expand description
GitHub Permalink expansion.
This module provides functionality for parsing GitHub permalink URLs and fetching raw file content to display as code blocks.
Structsยง
- GitHub
Permalink - A parsed GitHub permalink.
- Line
Range - A line range extracted from a GitHub permalink fragment.
Enumsยง
- GitHub
Expand Error - Errors that can occur when expanding a GitHub permalink.
Staticsยง
- GITHUB_
PERMALINK_ ๐REGEX - Regex pattern for matching GitHub permalink URLs.
Functionsยง
- language_
for_ ๐path - Extracts the filename from a path and returns the appropriate language identifier.
- truncate_
lines ๐ - Truncates lines to the given maximum, returning the joined string and whether truncation occurred.