diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-07-15 14:45:50 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-07-15 14:45:50 +0200 |
commit | 337d3b3d8fca29ff90cf79c18690e14fb7a17ae2 (patch) | |
tree | 6ebf499875bd98aa72eccc7d9edf963142a08609 /src/tokenizer.rs | |
parent | d19934cf351168bd1a3a285b35af047f0fb3655b (diff) | |
download | markdown-rs-337d3b3d8fca29ff90cf79c18690e14fb7a17ae2.tar.gz markdown-rs-337d3b3d8fca29ff90cf79c18690e14fb7a17ae2.tar.bz2 markdown-rs-337d3b3d8fca29ff90cf79c18690e14fb7a17ae2.zip |
Add docs and refactor document content type
Diffstat (limited to '')
-rw-r--r-- | src/tokenizer.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/tokenizer.rs b/src/tokenizer.rs index 25efaac..17622e7 100644 --- a/src/tokenizer.rs +++ b/src/tokenizer.rs @@ -130,12 +130,21 @@ pub struct Media { pub id: String, } +/// Supported containers. +#[derive(Debug, PartialEq)] +pub enum Container { + BlockQuote, + ListItem, +} + /// Info used to tokenize the current container. /// /// This info is shared between the initial construct and its continuation. /// It’s only used for list items. -#[derive(Default, Debug)] +#[derive(Debug)] pub struct ContainerState { + /// Kind. + pub kind: Container, /// Whether the first (and all future) lines were blank. pub blank_initial: bool, /// The size of the initial construct. |