pub enum LineKind {
Para,
Heading {
level: u8,
},
Code {
lang: Option<String>,
},
Island,
Rule,
}Expand description
The block role of a line. The tree between lines is inferred: two adjacent
lines with equal kind+containers are two blocks of that role (e.g. two
paragraphs), never one.
Closed, on the same terms as MarkKind: a kind outside this set is
ParseError::UnknownName at every
decoder, so adding a role is a storage-version event.
Variants§
Para
Heading
ATX/Setext heading, level 1..=6.
Code
A line of a code block. lang is the (sanitized) info string, shared by
every line of the same block.
Island
A block-level island: the line’s sole content is one ISLAND_SLOT
backing an island whose markdown is a block
(IslandType::block_only).
An image is inline markup, so a line holding one alone is
Para — the kind re-importing  yields,
and the kind Content::normalize writes there.
Rule
A thematic break (---/***/___). The line carries no text.
Implementations§
Source§impl LineKind
impl LineKind
Sourcepub fn takes_continuations(&self) -> bool
pub fn takes_continuations(&self) -> bool
Whether a block of this kind renders the lines that Line::continues
joins to its first. A paragraph spans its hard-break run and a code
block its fence’s interior; a heading, an island and a rule are one
line, and both emitters render that line alone, so a continuation there
is text the projection never reaches.