Skip to main content

Module context

Module context 

Source
Expand description

Context extraction for span surroundings.

Provides line-based context extraction using ropey for efficient UTF-8 aware line/column calculations.

Functionsยง

extract_context
Extract context lines for a byte span.
extract_context_asymmetric
Extract context lines for a byte span with asymmetric before/after counts.
extract_context_with_before_after
Extract context lines for a byte span with separate before/after context.
resolve_context_counts
Resolve context counts from -A/-B/-C flags following grep convention.