Skip to main contentModule emphasis_utils
Source - EmphasisMarker
- Represents an emphasis marker found in text
- EmphasisSpan
- Represents a complete emphasis span
- find_emphasis_markers
- Optimized emphasis marker parsing using byte iteration
- find_emphasis_spans
- Optimized emphasis span finding with reduced complexity (includes both single and strong)
- find_single_emphasis_spans
- Find all emphasis spans in a line, excluding only single emphasis (not strong)
- has_doc_patterns
- Check if line has documentation patterns that should be preserved
- replace_inline_code
- Enhanced inline code replacement with optimized performance
Replaces inline code with ‘X’ characters to prevent false positives in emphasis detection
- replace_inline_math
- Replace inline math ($…$ and $$…$$) with placeholder characters
This prevents math content from being mistaken for emphasis markers