Expand description
Inline style extraction for markdown text.
This module extracts styled regions (bold, italic, code, links, etc.) from the inline parse trees, plus GitHub autolink references.
Structs§
- GitHub
Context - GitHub repository context for resolving relative references like #123.
- Naked
Url - A naked URL detected in text (not inside markdown link syntax).
- RawGit
HubMatch - A raw match from regex detection (before validation).
- Styled
Region - A styled region of inline text with its delimiters.
- Text
Style - Style attributes for inline text.
Enums§
- GitHub
Ref - A detected GitHub reference.
Functions§
- detect_
github_ references_ in_ line - Detect GitHub references in a single line of text.
- detect_
naked_ urls - Detect naked URLs in a single line of text.
- extract_
all_ inline_ styles - Extract all inline styles from a markdown tree. Returns a flat Vec sorted by start byte position.
- github_
refs_ to_ styled_ regions - Convert validated GitHub references into styled regions.
- naked_
urls_ to_ styled_ regions - Convert naked URLs into styled regions (clickable links).
For GitHub URLs with validated refs, sets display_text for shortening.
If
contextis provided, refs from the same repo omit theowner/repoprefix. - styles_
in_ range - Get inline styles that overlap with a byte range. Uses binary search for efficient lookup.