use std::io::{self, ErrorKind::Unsupported};
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord)]
pub struct Content(pub Vec<Section>);
type Values = Vec<FmlValue>;
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord)]
pub struct Section(pub Values);
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Hash)]
pub enum FmlValue {
Heading1(Values),
Heading2(Values),
Heading3(Values),
Superline(Values),
Subline(Values),
Bold(Values),
Italic(Values),
Strikethrough(Values),
Quote(Values),
ListItem(Values),
Function(FmlFunction),
Superscript(Values),
Subscript(Values),
Underline(Values),
ColorFg(FmlColor),
ColorBg(FmlColor),
ContentWarning { reason: String, body: Values },
CodeBlock { lang: Option<String>, body: String },
Newline,
InlineCode(String),
Typst(String),
Text(String),
}
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Hash)]
pub struct FmlFunction {
pub name: String,
pub params: Option<String>,
pub body: Values,
}
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Hash)]
pub struct FmlColor {
pub color: String,
pub body: Values,
}