marqdo
No .mq.md files found in this path.
Opening {}…
input".into()
};
format!(
r#""#,
path = escape(rel),
hint = hint,
rows = rows,
placeholder = escape(&placeholder),
stdin = escape(&vm.preset_stdin),
)
}
LinkMode::Static { .. } => {
if vm.preset_stdin.is_empty() {
String::new()
} else {
format!(
r#"Demo stdin (static export cannot re-run interactively); prompts: {prompts}
{stdin}"#,
prompts = escape(&vm.input_prompts.join(" · ")),
stdin = escape(&vm.preset_stdin),
)
}
}
}
};
let fallback_title = Path::new(rel)
.file_name()
.and_then(|s| s.to_str())
.unwrap_or(rel)
.trim_end_matches(".mq.md");
let title = crate::view::title_from_source(&vm.source, fallback_title);
let plots_html = if vm.plots.is_empty() {
String::new()
} else {
let mut s = String::from(r#"Use Run with input or Run — thinking and answer stream here.
{source}
{}
{}"#,
escape(wb)
)
}
(Some(wb), LinkMode::Static { .. }) => {
format!(r#"workbook {}"#, escape(wb))
}
_ => String::new(),
};
let process = plan_process_list(events);
format!(
r#"nav
", "main
"); assert!(html.contains("container-name: mq-panel"), "{html}"); } #[test] fn notebook_ui_has_controls() { let ui = notebook_ui(); for id in [ "nb-run-all", "nb-restart", "nb-step", "nb-state", "nb-journal", "nb-reload", "nb-debug", "nb-theme", "nb-kernel-input", "nb-push", "nb-pull", "nb-state-out", ] { assert!(ui.contains(id), "notebook UI missing {id}"); } assert!( !ui.contains("\"/api/session"), "notebook API URLs must stay relative for path-prefix proxy" ); assert!(ui.contains("post(\"api/session/open\"")); assert!(!ui.contains("In ["), "view cells must not mimic Jupyter In[] prompts"); assert!(!ui.contains("Out ["), "view cells must not mimic Jupyter Out[] prompts"); assert!(ui.contains("id=\"nb-clear\""), "view must expose Clear outputs"); assert!(ui.contains("api/session/clear"), "Clear outputs must call the session API"); } }