From 6ee90b34c87354baf8e03d5469a92cf5dd17a82b Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Tue, 16 Aug 2022 16:49:29 +0200 Subject: Add support for frontmatter --- src/state.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/state.rs') diff --git a/src/state.rs b/src/state.rs index f9cc39a..da935d1 100644 --- a/src/state.rs +++ b/src/state.rs @@ -110,6 +110,7 @@ pub enum Name { DestinationRawEscape, DocumentStart, + DocumentBeforeFrontmatter, DocumentContainerExistingBefore, DocumentContainerExistingAfter, DocumentContainerNewBefore, @@ -133,6 +134,17 @@ pub enum Name { FlowBlankLineAfter, FlowBeforeParagraph, + FrontmatterStart, + FrontmatterOpenSequence, + FrontmatterOpenAfter, + FrontmatterAfter, + FrontmatterContentStart, + FrontmatterContentInside, + FrontmatterContentEnd, + FrontmatterCloseStart, + FrontmatterCloseSequence, + FrontmatterCloseAfter, + HardBreakEscapeStart, HardBreakEscapeAfter, @@ -393,6 +405,7 @@ pub fn call(tokenizer: &mut Tokenizer, name: Name) -> State { Name::DestinationRawEscape => construct::partial_destination::raw_escape, Name::DocumentStart => construct::document::start, + Name::DocumentBeforeFrontmatter => construct::document::before_frontmatter, Name::DocumentContainerExistingBefore => construct::document::container_existing_before, Name::DocumentContainerExistingAfter => construct::document::container_existing_after, Name::DocumentContainerNewBefore => construct::document::container_new_before, @@ -420,6 +433,17 @@ pub fn call(tokenizer: &mut Tokenizer, name: Name) -> State { Name::FlowBlankLineAfter => construct::flow::blank_line_after, Name::FlowBeforeParagraph => construct::flow::before_paragraph, + Name::FrontmatterStart => construct::frontmatter::start, + Name::FrontmatterOpenSequence => construct::frontmatter::open_sequence, + Name::FrontmatterOpenAfter => construct::frontmatter::open_after, + Name::FrontmatterAfter => construct::frontmatter::after, + Name::FrontmatterContentStart => construct::frontmatter::content_start, + Name::FrontmatterContentInside => construct::frontmatter::content_inside, + Name::FrontmatterContentEnd => construct::frontmatter::content_end, + Name::FrontmatterCloseStart => construct::frontmatter::close_start, + Name::FrontmatterCloseSequence => construct::frontmatter::close_sequence, + Name::FrontmatterCloseAfter => construct::frontmatter::close_after, + Name::HardBreakEscapeStart => construct::hard_break_escape::start, Name::HardBreakEscapeAfter => construct::hard_break_escape::after, -- cgit