pub struct HtmlBlock<'a> {
pub kind: u8,
pub lines: ArenaVec<'a, Segment>,
pub trailing_newline: bool,
pub span: Span,
}Expand description
A raw HTML block. Contents are never parsed or formatted.
Fields§
§kind: u8CommonMark HTML block type 1–7.
Type 1 (<pre>/<script>/<style>/ <textarea>) runs to its closing tag;
the rest end at a blank line,
which is how markdown content interleaves between unbalanced tags.
lines: ArenaVec<'a, Segment>Logical content lines, verbatim.
trailing_newline: boolWhether the block’s final line ending belongs to its content
(micromark: html.value ends with a line ending).
Only types 1–5, in two cases.
The block was still open at EOF (or at a directive’s closing fence), outside any blockquote.
The line that closed its container opened a new one (list item, blockquote, footnote definition).
Types 6–7 end at their last content line, so never.
span: SpanTrait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for HtmlBlock<'a>
impl<'a> !Send for HtmlBlock<'a>
impl<'a> !UnwindSafe for HtmlBlock<'a>
impl<'a> Freeze for HtmlBlock<'a>
impl<'a> Sync for HtmlBlock<'a>
impl<'a> Unpin for HtmlBlock<'a>
impl<'a> UnsafeUnpin for HtmlBlock<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more