diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-07-14 17:40:10 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-07-14 17:40:10 +0200 |
commit | 8183323c432fc1359c634feb68bc372e13f0bd03 (patch) | |
tree | 0c80086a956d216960cedc436a3b22372190b7a8 /src/tokenizer.rs | |
parent | e2c9664b0d63ec686f9e4625ac11bb21720f74dc (diff) | |
download | markdown-rs-8183323c432fc1359c634feb68bc372e13f0bd03.tar.gz markdown-rs-8183323c432fc1359c634feb68bc372e13f0bd03.tar.bz2 markdown-rs-8183323c432fc1359c634feb68bc372e13f0bd03.zip |
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
Diffstat (limited to '')
-rw-r--r-- | src/tokenizer.rs | 10 |
1 files changed, 10 insertions, 0 deletions
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<ContainerState>, } 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![], } |