package asai

  1. Overview
  2. Docs

Module type Explicator.SSource

The signature of explicators.

module Tag : Tag
val explicate : ?line_breaks:[ `Unicode | `Traditional ] -> ?block_splitting_threshold:int -> ?blend:(Tag.t -> Tag.t -> Tag.t) -> ?debug:bool -> (Tag.t * Range.t) list -> Tag.t Explication.t

Explicate a list of ranges using content from a data reader. This function must be run under SourceReader.run.

  • parameter line_breaks

    The set of character sequences that are recognized as (hard) line breaks. The `Unicode set contains all Unicode character sequences in Unicode 15.0.0 Table 5-1. The `Traditional set only contains U+000A (LF), U+000D (CR), and U+000D U+000A (CRLF) as line breaks. The default is the `Traditional set.

  • parameter block_splitting_threshold

    The maximum number of consecutive, non-highlighted lines allowed in a block. The function will try to minimize the number of blocks, as long as no block has too many consecutive, non-highlighted lines. A higher threshold will lead to fewer blocks. When the threshold is zero, it means no block can contain any non-highlighted line. The default value is zero.

  • parameter blend

    The algorithm to blend two tags on a visual range. The default algorithm chooses the more important tag based on priority.

  • parameter debug

    Whether to enable the debug mode that performs expensive extra checking. The default is false.