pub fn parse_markdown_formatting(text: &str) -> Option<ParsedFormatting>Expand description
Parse markdown emphasis markers from message text and return cleaned text
plus formatting ranges. Returns None if text is unchanged.
Algorithm (4 phases):
- Protect code blocks, inline code, URLs with PUA character runs
- Process backslash escapes
- Sequential emphasis passes (longest markers first), adjusting offsets
- Restore protected regions and escaped characters