diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-07-07 11:37:12 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-07-07 11:37:12 +0200 |
commit | 71781c2a05ba7da04d0666db17dc85e23e9c1252 (patch) | |
tree | 1ad63628bcac407803f622d70be38cbadea40818 /src/subtokenize.rs | |
parent | a4436b91eabf3911ab59ac3f6be9de877b4f415a (diff) | |
download | markdown-rs-71781c2a05ba7da04d0666db17dc85e23e9c1252.tar.gz markdown-rs-71781c2a05ba7da04d0666db17dc85e23e9c1252.tar.bz2 markdown-rs-71781c2a05ba7da04d0666db17dc85e23e9c1252.zip |
Add support for `Flow` content type
Diffstat (limited to '')
-rw-r--r-- | src/subtokenize.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/subtokenize.rs b/src/subtokenize.rs index 6b0460c..dd0351d 100644 --- a/src/subtokenize.rs +++ b/src/subtokenize.rs @@ -21,7 +21,7 @@ //! thus the whole document needs to be parsed up to the level of definitions, //! before any level that can include references can be parsed. -use crate::content::{string::start as string, text::start as text}; +use crate::content::{flow::start as flow, string::start as string, text::start as text}; use crate::parser::ParseState; use crate::tokenizer::{ContentType, Event, EventType, State, StateFn, StateFnResult, Tokenizer}; use crate::util::span; @@ -90,7 +90,9 @@ pub fn subtokenize(mut events: Vec<Event>, parse_state: &ParseState) -> (Vec<Eve let mut tokenizer = Tokenizer::new(event.point.clone(), event.index, parse_state); // Substate. let mut result: StateFnResult = ( - State::Fn(Box::new(if *content_type == ContentType::String { + State::Fn(Box::new(if *content_type == ContentType::Flow { + flow + } else if *content_type == ContentType::String { string } else { text |