Function lineSpan

Calculates the span, defined in Range indexes, that includes start through to end character positions.

After using splitRanges to split text, lineSpan is used to associate some text coordinates with ranges.

  • Parameters

    • ranges: readonly Range[]

      Ranges

    • start: number

      Start character position, in source text reference

    • end: number

      End character position, in source text reference

    Returns LineSpan

    Span