pub enum HeadingAttrsStyle {
Preserve,
Canonicalise,
}Expand description
Heading-attribute trailer emission policy.
# Heading {#id .class key=val} parses (with
Options::ENABLE_HEADING_ATTRIBUTES) into a Tag::Heading carrying
the parsed id, classes, and attrs. This knob decides how the
formatter re-emits the trailer.
Self::Preserve(default): emit the source trailer byte-verbatim between the rendered inline body and the line terminator. Matches the preserve-by-default ethos every other style knob defaults to.Self::Canonicalise: emit{#id .class₁ .class₂ k=val}in a fixed order: id first, then classes in source order, then key=value pairs in source order. Matches mdformat-mkdocs canonical.
Variants§
Preserve
Emit the source trailer byte-verbatim.
Canonicalise
Emit the trailer in fixed canonical order: #id, then classes
(source order), then key=value pairs (source order).
Trait Implementations§
Source§impl Clone for HeadingAttrsStyle
impl Clone for HeadingAttrsStyle
Source§fn clone(&self) -> HeadingAttrsStyle
fn clone(&self) -> HeadingAttrsStyle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HeadingAttrsStyle
impl Debug for HeadingAttrsStyle
Source§impl Default for HeadingAttrsStyle
impl Default for HeadingAttrsStyle
Source§fn default() -> HeadingAttrsStyle
fn default() -> HeadingAttrsStyle
Returns the “default value” for a type. Read more
Source§impl PartialEq for HeadingAttrsStyle
impl PartialEq for HeadingAttrsStyle
Source§fn eq(&self, other: &HeadingAttrsStyle) -> bool
fn eq(&self, other: &HeadingAttrsStyle) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for HeadingAttrsStyle
impl Eq for HeadingAttrsStyle
impl StructuralPartialEq for HeadingAttrsStyle
Auto Trait Implementations§
impl Freeze for HeadingAttrsStyle
impl RefUnwindSafe for HeadingAttrsStyle
impl Send for HeadingAttrsStyle
impl Sync for HeadingAttrsStyle
impl Unpin for HeadingAttrsStyle
impl UnsafeUnpin for HeadingAttrsStyle
impl UnwindSafe for HeadingAttrsStyle
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