🎨 All fn ...prepare...() return PrepareMarkup
This commit is contained in:
parent
2d906621de
commit
0cc2d7ee2d
4 changed files with 20 additions and 14 deletions
10
src/html.rs
10
src/html.rs
|
|
@ -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) },
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue