use crate::{
helpers::{safe_html_char, safe_html_str},
traits::{write_tag_close, write_tag_self_close, write_tag_start},
MathElement, MathML,
};
use std::{
collections::BTreeMap,
fmt::{Display, Formatter},
iter::repeat,
};
mod constructors;
mod display;
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct MathOperator {
operator: String,
attributes: BTreeMap<String, String>,
}
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct MathSpace {
attributes: BTreeMap<String, String>,
}
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct MathSqrt {
base: MathML,
surd: Option<MathML>,
}
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct MathMultiScript {
base: MathML,
ru: Vec<MathML>,
rd: Vec<MathML>,
lu: Vec<MathML>,
ld: Vec<MathML>,
attributes: BTreeMap<String, String>,
}
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct MathUnderOver {
base: MathML,
under: Option<MathML>,
over: Option<MathML>,
attributes: BTreeMap<String, String>,
}
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct MathFenced {
base: Vec<MathML>,
open: char,
close: char,
separators: String,
}