diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/subtokenize.rs | 6 | ||||
-rw-r--r-- | src/tokenizer.rs | 2 |
2 files changed, 6 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 diff --git a/src/tokenizer.rs b/src/tokenizer.rs index 8c8cf58..8c11a68 100644 --- a/src/tokenizer.rs +++ b/src/tokenizer.rs @@ -1707,6 +1707,8 @@ pub enum TokenType { /// Embedded content type. #[derive(Debug, Clone, Copy, PartialEq)] pub enum ContentType { + /// Represents [flow content][crate::content::flow]. + Flow, /// Represents [text content][crate::content::text]. Text, /// Represents [string content][crate::content::string]. |