From 337d3b3d8fca29ff90cf79c18690e14fb7a17ae2 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Fri, 15 Jul 2022 14:45:50 +0200 Subject: Add docs and refactor document content type --- src/tokenizer.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/tokenizer.rs') 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. -- cgit