SourceMap

Maps offsets in raw extracted content (paragraph/heading text after whitespace stripping) back to absolute document positions.

Multi-line content (e.g. paragraphs) has per-line entries because each line may have different amounts of leading whitespace stripped.

Constructors

Link copied to clipboard
constructor(entries: List<SourceMap.LineMapping>)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class LineMapping(val rawStart: Int, val docStart: Int)

Functions

Link copied to clipboard
fun toAbsolute(rawOffset: Int): Int

Converts a raw-content offset to an absolute document offset.