pub struct FrontmatterPlugin;Expand description
Renders top-level YAML frontmatter mappings as a description list.
Enable frontmatter parsing with super::MarkdownExtensions::frontmatter
before registering this plugin. Values are rendered as plain text; YAML
block scalars with |- and >- are supported. Quoted/compound values,
comments after values, other block headers, and more-indented folded lines
use TextView’s YAML code block fallback.
Implementations§
Trait Implementations§
Source§impl Default for FrontmatterPlugin
impl Default for FrontmatterPlugin
Source§fn default() -> FrontmatterPlugin
fn default() -> FrontmatterPlugin
Returns the “default value” for a type. Read more
Source§impl MarkdownPlugin for FrontmatterPlugin
impl MarkdownPlugin for FrontmatterPlugin
Source§fn parse(
&self,
node: &Node,
cx: &MarkdownParseContext<'_>,
) -> Option<MarkdownNode>
fn parse( &self, node: &Node, cx: &MarkdownParseContext<'_>, ) -> Option<MarkdownNode>
Convert an mdast node into a custom Markdown node.
Source§fn render(
&self,
node: &MarkdownNode,
_window: &mut Window,
_cx: &mut App,
) -> impl IntoElement
fn render( &self, node: &MarkdownNode, _window: &mut Window, _cx: &mut App, ) -> impl IntoElement
Render a custom Markdown node produced by this plugin.
Auto Trait Implementations§
impl Freeze for FrontmatterPlugin
impl RefUnwindSafe for FrontmatterPlugin
impl Send for FrontmatterPlugin
impl Sync for FrontmatterPlugin
impl Unpin for FrontmatterPlugin
impl UnsafeUnpin for FrontmatterPlugin
impl UnwindSafe for FrontmatterPlugin
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().