diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-08-16 16:49:29 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-08-16 16:49:53 +0200 |
commit | 6ee90b34c87354baf8e03d5469a92cf5dd17a82b (patch) | |
tree | cfa64be772be6464e6f790dabccf8a77e7afe60e /src/state.rs | |
parent | 93d0b7c6465f4ffe220b3ddada729746b11eb6ce (diff) | |
download | markdown-rs-6ee90b34c87354baf8e03d5469a92cf5dd17a82b.tar.gz markdown-rs-6ee90b34c87354baf8e03d5469a92cf5dd17a82b.tar.bz2 markdown-rs-6ee90b34c87354baf8e03d5469a92cf5dd17a82b.zip |
Add support for frontmatter
Diffstat (limited to 'src/state.rs')
-rw-r--r-- | src/state.rs | 24 |
1 files changed, 24 insertions, 0 deletions
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, |