pub enum HeadingIdPolicy {
Gfm,
Pandoc,
Off,
}Expand description
Determines the algorithm used to auto-generate heading id attributes
(see TmplHtml::auto_heading_ids).
Variants§
Gfm
GitHub/GitLab-style slug: lowercase, strip everything but Unicode letters/digits/hyphens/underscores/spaces, spaces become hyphens. Matches how the same note renders on those forges.
Pandoc
Pandoc’s auto_identifiers algorithm: like Gfm, but periods are
also kept, and any leading run of non-letter characters is stripped
(2. Section becomes section, not 2-section).
Off
No behaviour change: headings without an explicit id stay that way.
Trait Implementations§
Source§impl Clone for HeadingIdPolicy
impl Clone for HeadingIdPolicy
impl Copy for HeadingIdPolicy
Source§impl Debug for HeadingIdPolicy
impl Debug for HeadingIdPolicy
Source§impl Default for HeadingIdPolicy
impl Default for HeadingIdPolicy
Source§impl<'de> Deserialize<'de> for HeadingIdPolicy
impl<'de> Deserialize<'de> for HeadingIdPolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for HeadingIdPolicy
Source§impl PartialEq for HeadingIdPolicy
impl PartialEq for HeadingIdPolicy
Source§impl Serialize for HeadingIdPolicy
impl Serialize for HeadingIdPolicy
impl StructuralPartialEq for HeadingIdPolicy
Auto Trait Implementations§
impl Freeze for HeadingIdPolicy
impl RefUnwindSafe for HeadingIdPolicy
impl Send for HeadingIdPolicy
impl Sync for HeadingIdPolicy
impl Unpin for HeadingIdPolicy
impl UnsafeUnpin for HeadingIdPolicy
impl UnwindSafe for HeadingIdPolicy
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 more