microcad_lang_markdown/
paragraph.rs1use crate::code_block::CodeBlock;
5
6#[derive(Debug, Clone, PartialEq)]
8pub enum Paragraph {
9 Text(String),
11
12 CodeBlock(CodeBlock),
14
15 Table(String),
17}
18
19impl std::fmt::Display for Paragraph {
20 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
21 match &self {
22 Paragraph::Text(text) => writeln!(f, "{text}"),
23 Paragraph::CodeBlock(code_block) => writeln!(f, "{code_block}"),
24 Paragraph::Table(table) => writeln!(f, "{table}"),
25 }
26 }
27}