🎨 All fn ...prepare...() return PrepareMarkup

This commit is contained in:
Manuel Cillero 2024-04-23 23:11:30 +02:00
parent 2d906621de
commit 0cc2d7ee2d
4 changed files with 20 additions and 14 deletions

View file

@ -38,3 +38,13 @@ pub enum PrepareMarkup {
Text(&'static str),
With(Markup),
}
impl PrepareMarkup {
pub fn render(&self) -> Markup {
match self {
PrepareMarkup::None => html! {},
PrepareMarkup::Text(text) => html! { (text) },
PrepareMarkup::With(markup) => html! { (markup) },
}
}
}