From 8183323c432fc1359c634feb68bc372e13f0bd03 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Thu, 14 Jul 2022 17:40:10 +0200 Subject: Add support for container state * Fix to parse list item continuation based on how big the initial list item prefix was * Fix list items that start with blank lines --- src/tokenizer.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/tokenizer.rs') diff --git a/src/tokenizer.rs b/src/tokenizer.rs index 163c2bf..34cfde3 100644 --- a/src/tokenizer.rs +++ b/src/tokenizer.rs @@ -130,6 +130,13 @@ pub struct Media { pub id: String, } +/// To do. +#[derive(Default, Debug)] +pub struct ContainerState { + pub blank_initial: bool, + pub size: usize, +} + /// The internal state of a tokenizer, not to be confused with states from the /// state machine, this instead is all the information about where we currently /// are and what’s going on. @@ -203,6 +210,8 @@ pub struct Tokenizer<'a> { pub concrete: bool, /// To do. pub lazy: bool, + /// To do. + pub container: Option, } impl<'a> Tokenizer<'a> { @@ -225,6 +234,7 @@ impl<'a> Tokenizer<'a> { interrupt: false, concrete: false, lazy: false, + container: None, resolvers: vec![], resolver_ids: vec![], } -- cgit