generate document title based on first line

This commit is contained in:
yggverse 2025-06-28 09:58:04 +03:00
parent 5c3f41c054
commit 1fa8f3f29d
2 changed files with 18 additions and 4 deletions

View file

@ -61,11 +61,12 @@ impl Text {
}
pub fn nex(actions: (&Rc<WindowAction>, &Rc<ItemAction>), base: &Uri, data: &str) -> Self {
let text_view = TextView::nex(actions, base, data);
let mut title = None;
let text_view = TextView::nex(actions, base, data, &mut title);
Self {
scrolled_window: reader(&text_view),
text_view,
meta: Meta { title: None },
meta: Meta { title },
}
}