use crate::code_block::CodeBlock;
#[derive(Debug, Clone, PartialEq)]
pub enum Paragraph {
Text(String),
CodeBlock(CodeBlock),
Table(String),
}
impl std::fmt::Display for Paragraph {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self {
Paragraph::Text(text) => writeln!(f, "{text}"),
Paragraph::CodeBlock(code_block) => writeln!(f, "{code_block}"),
Paragraph::Table(table) => writeln!(f, "{table}"),
}
}
}