use crate::{Line, Table}; pub enum Block { Heading1(Line), Heading2(Line), Heading3(Line), Paragraph(Line), List(Vec), Quote(Vec), Code(String, Vec), Table(Table), } impl std::fmt::Debug for Block { fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> { f.write_str(match self { Self::Heading1(_) => "Heading1", Self::Heading2(_) => "Heading2", Self::Heading3(_) => "Heading3", Self::Paragraph(_) => "Paragraph", Self::List(_) => "List", Self::Quote(_) => "Quote", Self::Code(_, _) => "Code", Self::Table(_) => "Table", }) } }