Added formatting to choices
This commit is contained in:
parent
721c3d6fdc
commit
0580822f36
@ -315,6 +315,9 @@ fn load_multilinear(mld_path: &Path) -> Option<NamedMultilinearInfo> {
|
||||
}
|
||||
|
||||
fn render_choice(block: &DialogBlock<Parameter>, index: usize, progress: &str) -> Markup {
|
||||
let mut content = Vec::new();
|
||||
convert(std::iter::once(&block.lines[0].text), &mut content);
|
||||
|
||||
html! {
|
||||
form method="POST" {
|
||||
input type="hidden" name="progress" value=(progress);
|
||||
@ -325,7 +328,10 @@ fn render_choice(block: &DialogBlock<Parameter>, index: usize, progress: &str) -
|
||||
@if !block.name.is_empty() {
|
||||
legend .choice-name { (block.name) }
|
||||
}
|
||||
(block.lines[0].text)
|
||||
@match String::from_utf8(content) {
|
||||
Ok(text) => (maud::PreEscaped(text)),
|
||||
Err(e) => (maud::PreEscaped(format!("Error: {}", e))),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user