pub enum Block {
Show 17 variants
Heading(Heading),
Byline(Vec<Inline>),
Paragraph(Vec<Inline>),
Lines(Vec<Vec<Inline>>),
List(List),
Definitions(Vec<Definition>),
Code(CodeBlock),
Table(TableBlock),
Quote {
blocks: Vec<Block>,
attribution: Option<Vec<Inline>>,
},
Admonition {
kind: AdmonitionKind,
title: Option<Vec<Inline>>,
blocks: Vec<Block>,
},
Aside {
title: Option<Vec<Inline>>,
blocks: Vec<Block>,
},
Indent {
amount: usize,
blocks: Vec<Block>,
},
Rule,
Image {
target: String,
alt: String,
},
Properties {
name: Option<String>,
entries: Vec<(String, String)>,
},
Banner {
left: String,
center: String,
right: String,
},
Caption(Vec<Inline>),
}Expand description
One block of a document.
Variants§
Heading(Heading)
A heading. Level 1 is the document title’s level and is centred, as
Markdown’s # heading is; deeper levels are left-aligned.
Byline(Vec<Inline>)
Author, date or revision lines under a title, shown dim.
Paragraph(Vec<Inline>)
A paragraph of running text, wrapped to the width.
Lines(Vec<Vec<Inline>>)
Lines whose breaks are kept (verse, a man page’s no-fill text), each still wrapped when it is wider than the width.
List(List)
A bullet, numbered, checkbox or callout list.
Definitions(Vec<Definition>)
Terms and their definitions.
Code(CodeBlock)
Source code or preformatted text, drawn with Syntax.
Table(TableBlock)
A table, drawn with core’s Table as Markdown tables are.
Quote
A block quote, with an optional attribution.
Admonition
A note, tip, warning and the like, drawn in a titled panel.
Aside
A sidebar or other aside, drawn in a plain panel.
Indent
Blocks indented by amount cells (a man page’s .RS/.IP).
Rule
A horizontal rule.
Image
An image, shown as a placeholder: the image marker and its alt text.
Properties
Metadata shown compactly and dim: an Org drawer or property list,
planning lines, unrecognised keywords. name is the drawer’s name.
Banner
A running header or footer: left, centre and right parts on one row
(a man page’s LS(1) User Commands LS(1)).
Caption(Vec<Inline>)
A caption or block title, shown dim and italic above what it names.