sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
The definition of highlighted text suitable for rendering. You probably do not need this module unless you want to create your own backend.
type 'style segment = (string, 'style) styled
A segment is a styled string from the user content.
type 'style block = {
start_line_num : int;
The starting 1-indexed line number of a block.
*)lines : 'style line list;
}
A block is a collection of consecutive lines.
type 'style part = {
file_path : string;
The file path of a part.
*)blocks : 'style block list;
The blocks within a part.
*)}
A part consists of multiple blocks from the same file. These blocks should be non-overlapping and sorted by importance or the textual order.
type 'style t = 'style part list
Highlighted texts instead of spans.
val style : 'style -> 'value -> ('value, 'style) styled
val dump :
(Stdlib.Format.formatter -> 'style -> unit) ->
Stdlib.Format.formatter ->
'style t ->
unit
Ugly printer for debugging