Source Lines #
A nonempty array of source lines, and the subslice operations that the parser uses to delimit them.
The subslice from a to b, or the empty subslice at a if b is before a.
Equations
- Lean.Markdown.subsliceClamped a b = if h : a ≤ b then s.subslice a b h else s.subslice a a ⋯
Instances For
Parses a line ending, which is \r\n, \r, or \n (CommonMark §2.1), at p in input. Returns
the position after the ending.
Equations
- One or more equations did not get rendered due to their size.
Instances For
text without the trailing characters that satisfy p.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The text of a construct that may span source lines, as one subslice per line.
The lines are in source order and are nonempty. The subslices exclude line endings and the prefixes of enclosing containers.
The subslices, one per source line, in source order.
There is at least one line.
Instances For
A single line.
Instances For
The first line.
Instances For
The last line.
Instances For
The text of the lines, joined by sep.
Equations
- lines.text sep = sep.intercalate lines.copy.toList
Instances For
Equations
The subslice from the start of first to the end of last.
Equations
- Lean.Markdown.span first last = Lean.Markdown.subsliceClamped first.startInclusive last.endExclusive
Instances For
The subslice from the start of the first line to the end of the last.
Equations
- lines.extent = Lean.Markdown.span lines.first lines.last