pub struct MdBlock {Show 19 fields
pub kind: u8,
pub level: u8,
pub text: String,
pub spans: Vec<MdSpan>,
pub quote: u8,
pub list: u8,
pub path: u32,
pub marker: u8,
pub number: u32,
pub delim: u8,
pub task: u8,
pub space: u8,
pub lang: String,
pub cells: Vec<(u32, u32)>,
pub table: u32,
pub head: bool,
pub align: u8,
pub node: MdNode,
pub boxes: Vec<u32>,
}Expand description
a block of the document (see the module header)
Fields§
§kind: u8MB_*
level: u8headings: 1 ..= 6
text: Stringthe visible text (U+FFFC an image, ‘\n’ a hard break or a code line’s end, ‘\t’ between cells)
spans: Vec<MdSpan>styled ranges, ascending, not overlapping (the text between them is plain)
quote: u8block quotes around it
list: u8lists around it (0: none)
path: u32the containers from the outside in: bit i set = the i-th is a block quote, clear = a list
marker: u8MK_*: a list item starts with this block
number: u32MK_NUMBER: the item’s number and its delimiter (‘.’ or ‘)’)
delim: u8§task: u8a task item: 0 none, 1 open, 2 done
space: u8the gap before it: 0 none, 1 a tight list’s, 2 a paragraph’s
lang: Stringcode blocks: the language of the fence (“” none)
cells: Vec<(u32, u32)>table rows: the cells’ byte ranges
table: u32table rows: index into MdDoc::tables, a header row
head: bool§align: u8paragraphs: 0 start, 1 centre, 2 end (HTML)
node: MdNodeHTML: the element whose content it shows (the innermost block element: p, li, h1, the row of a cell …; MdNode::NONE: none, Markdown)
boxes: Vec<u32>HTML: the boxes of CSS around it (indices of MdDoc::boxes, outermost first)