A count of columns. Indentation is measured in columns (CommonMark §2.2). A space is one column, and a tab advances to the next tab stop, which is the next multiple of four.
- count : Nat
The number of columns.
Instances For
Equations
- Lean.Markdown.instReprColumns.repr x✝ prec✝ = Std.Format.bracket "{ " (Std.Format.nil ++ Std.Format.text "count" ++ Std.Format.text " := " ++ (Std.Format.nest 9 (repr x✝.count)).group) " }"
Instances For
Equations
Equations
Equations
- Lean.Markdown.Columns.instLE = { le := fun (a b : Lean.Markdown.Columns) => a.count ≤ b.count }
Equations
- Lean.Markdown.Columns.instLT = { lt := fun (a b : Lean.Markdown.Columns) => a.count < b.count }
Equations
- Lean.Markdown.Columns.instAdd = { add := fun (a b : Lean.Markdown.Columns) => { count := a.count + b.count } }
Equations
- Lean.Markdown.Columns.instSub = { sub := fun (a b : Lean.Markdown.Columns) => { count := a.count - b.count } }
The marker character of a bullet list.
- star : BulletKind
A
*-marked bullet list. - hyphen : BulletKind
A
--marked bullet list. - plus : BulletKind
A
+-marked bullet list.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- Lean.Markdown.instBEqBulletKind.beq x✝ y✝ = (x✝.ctorIdx == y✝.ctorIdx)
Instances For
Equations
Equations
Equations
Instances For
The terminating delimiter of an ordered-list marker.
- dot : OrderedDelim
A
.delimiter, as in1. - rparen : OrderedDelim
A
)delimiter, as in1)
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Markdown.instBEqOrderedDelim.beq x✝ y✝ = (x✝.ctorIdx == y✝.ctorIdx)
Instances For
Equations
Equations
The kind of a list.
All items in a list must share the same kind. An unordered list cannot mix * with -, and an
ordered list cannot mix 1. with 1).
- bullet (kind : BulletKind) : ListKind
A bullet list with the given marker character.
- ordered (start : Nat) (delim : OrderedDelim) : ListKind
An ordered list.
startis the value of the first item;delimis the punctuation that follows the digits.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Markdown.instBEqListKind.beq (Lean.Markdown.ListKind.bullet a) (Lean.Markdown.ListKind.bullet b) = (a == b)
- Lean.Markdown.instBEqListKind.beq (Lean.Markdown.ListKind.ordered a a_1) (Lean.Markdown.ListKind.ordered b b_1) = (a == b && a_1 == b_1)
- Lean.Markdown.instBEqListKind.beq x✝¹ x✝ = false
Instances For
Equations
Equations
Equations
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- Lean.Markdown.instBEqFenceChar.beq x✝ y✝ = (x✝.ctorIdx == y✝.ctorIdx)
Instances For
Equations
Equations
Equations
Instances For
Information that is attached to a fenced code block at its opening fence.
- fenceChar : FenceChar
The fence character:
`or~. - fenceLen : Nat
The length of the opening fence (always 3 or more). The closing fence must be at least this long and use the same character.
- openIndent : Columns
The indentation of the opening fence's first character. The content lines exclude up to this much indentation.
The info string, if there is one. This is usually a language tag.
Instances For
Equations
A line of a code block or HTML block, after the prefixes of the enclosing containers and the block's own indentation.
A tab spans the columns up to the next tab stop (CommonMark §2.2), so the indentation may end
partway through a tab. Such a tab is not part of source, and its columns after the indentation
are leadingSpaces.
- source : s.Subslice
The line's source, without its line ending.
- leadingSpaces : Nat
The number of columns of a tab that the indentation ends partway through.
Instances For
Equations
The line's text, which is leadingSpaces spaces followed by the source.
Instances For
A block of the source string s after the first pass, which determines the type and extent of every
block but does not parse inline content. The content of a paragraph or heading is an InlineSource.
- paragraph {s : String.Slice} (content : InlineSource s) : Raw s
A paragraph, which is a sequence of consecutive non-blank lines that don't start any other kind of block.
- atxHeading {s : String.Slice} (level : Nat) (hashes : s.Subslice) (content : InlineSource s) (closeHashes? : Option s.Subslice) : Raw s
An ATX heading (the usual kind).
levelis the number of opening#characters,hashesis that opening sequence, andcloseHashes?an optional closing sequence. - setextHeading {s : String.Slice} (level : Nat) (content : InlineSource s) (underline : s.Subslice) : Raw s
A setext heading (CommonMark §4.3), which is one or more lines of paragraph text that are followed by an
underline(===for level 1,---for level 2). - fencedCode {s : String.Slice} (info : FenceInfo s) (openFence : s.Subslice) (closeFence? : Option s.Subslice) (lines : Array (VerbatimLine s)) : Raw s
A fenced code block.
openFence/closeFence?are the fences. The closing fence is optional because an unterminated fenced code block spans the rest of the input. The contentlinesexclude up toinfo.openIndentcolumns of indentation. - indentedCode {s : String.Slice} (lines : Array (VerbatimLine s)) : Raw s
An indented code block, which is a sequence of lines that are indented four or more columns. The verbatim lines exclude the four column indentation.
- html {s : String.Slice} (lines : Array (VerbatimLine s)) : Raw s
An HTML block (CommonMark §4.6), which has at least one line.
- blockquote {s : String.Slice} (markers : Array s.Subslice) (children : Array (Raw s)) : Raw s
A blockquote container.
markerscontains every>marker, in source order, andchildrencontains the contained blocks. - list {s : String.Slice} (kind : ListKind) (tight : Bool) (items : Array (Raw s)) : Raw s
A list container. All
itemsarelistItemblocks.tightreflects CommonMark's tight/loose distinction (§5.3). A tight list doesn't have blank lines between its items or between blocks within an item. - listItem {s : String.Slice} (marker : s.Subslice) (children : Array (Raw s)) : Raw s
A list item.
markeris the bullet or ordered marker, andchildrenare the blocks that the item contains. - linkRefDef {s : String.Slice} (m : RefDef s) : Raw s
A link reference definition, which is written
[label]: destination "title"(the title is optional). - thematicBreak {s : String.Slice} (line : s.Subslice) : Raw s
A thematic break (
***,---, or___, optionally with interior spaces or tabs).lineis the line's content from its first marker to its last.
Instances For
Equations
Whether two list kinds belong to the same list (that is, they have matching marker styles).
The starting number of an ordered list is irrelevant, so 1. and 5. are the same list kind.
Bullets must use the exact same character, and ordered lists must use the same delimiter.
Equations
- (Lean.Markdown.ListKind.bullet a).sameKind (Lean.Markdown.ListKind.bullet b) = (a == b)
- (Lean.Markdown.ListKind.ordered a a_1).sameKind (Lean.Markdown.ListKind.ordered b b_1) = (a_1 == b_1)
- x✝¹.sameKind x✝ = false
Instances For
A block of the source string s, with its inline content parsed.
- paragraph {s : String.Slice} (content : Array (Inline s)) : Block s
A paragraph, which is a sequence of consecutive non-blank lines that don't start any other kind of block.
- atxHeading {s : String.Slice} (level : Nat) (hashes : s.Subslice) (content : Array (Inline s)) (closeHashes? : Option s.Subslice) : Block s
An ATX heading (the usual kind).
levelis the number of opening#characters,hashesis that opening sequence, andcloseHashes?an optional closing sequence. - setextHeading {s : String.Slice} (level : Nat) (content : Array (Inline s)) (underline : s.Subslice) : Block s
A setext heading (CommonMark §4.3), which is one or more lines of paragraph text that are followed by an
underline(===for level 1,---for level 2). - fencedCode {s : String.Slice} (info : FenceInfo s) (openFence : s.Subslice) (closeFence? : Option s.Subslice) (lines : Array (VerbatimLine s)) : Block s
A fenced code block.
openFence/closeFence?are the fences. The closing fence is optional because an unterminated fenced code block spans the rest of the input. The contentlinesexclude up toinfo.openIndentcolumns of indentation. - indentedCode {s : String.Slice} (lines : Array (VerbatimLine s)) : Block s
An indented code block, which is a sequence of lines that are indented four or more columns. The verbatim lines exclude the four column indentation.
- html {s : String.Slice} (lines : Array (VerbatimLine s)) : Block s
An HTML block (CommonMark §4.6), which has at least one line.
- blockquote {s : String.Slice} (markers : Array s.Subslice) (children : Array (Block s)) : Block s
A blockquote container.
markerscontains every>marker, in source order, andchildrencontains the contained blocks. - list {s : String.Slice} (kind : ListKind) (tight : Bool) (items : Array (Block s)) : Block s
A list container. All
itemsarelistItemblocks.tightreflects CommonMark's tight/loose distinction (§5.3). A tight list doesn't have blank lines between its items or between blocks within an item. - listItem {s : String.Slice} (marker : s.Subslice) (children : Array (Block s)) : Block s
A list item.
markeris the bullet or ordered marker, andchildrenare the blocks that the item contains. - linkRefDef {s : String.Slice} (m : RefDef s) : Block s
A link reference definition, which is written
[label]: destination "title"(the title is optional). - thematicBreak {s : String.Slice} (line : s.Subslice) : Block s
A thematic break (
***,---, or___, optionally with interior spaces or tabs).lineis the line's content from its first marker to its last.
Instances For
Equations
The whole block, from its first delimiter to the end of its last line.