Cmarkit.Block_line
Block lines.
In CommonMark blocks, a "line" does not necessarily correspond to a line in the source plain text. For example the lines of a paragraph in a block quote are the lines stripped from the block quote markers. We call the line resulting from stripping the block structure preceeding a given block a block line.
type t = string node
The type for block lines.
val to_string : t -> string
to_string l
is (fst l).
list_textloc ls
is a text location spanning the lines ls
This is Textloc.none
on []
.
list_of_string s
cuts s
on newlines. meta
is used for all nodes, default to Meta.none
.
type tight = Layout.blanks * t
The type for tight block lines. A block line with its initial blanks trimmed but kept for layout.
val tight_to_string : tight -> string
tight_to_string l
is (fst (snd l))
.
tigh_list_textloc ls
is a text location spanning the lines ls
This is Textloc.none
on []
.
list_of_string s
cuts s
on newlines and computes the blanks (except on the first line where they are part of the data). meta
is used for all nodes, default to Meta.none
.
type blank = Layout.blanks node
The type for blank block lines.