mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
remove extras
This commit is contained in:
parent
1706f14e96
commit
d674edc7d0
3 changed files with 12 additions and 69 deletions
|
|
@ -57,26 +57,13 @@ impl Text {
|
|||
actions: (&Rc<WindowAction>, &Rc<ItemAction>),
|
||||
base: &Uri,
|
||||
gemtext: &str,
|
||||
) -> Result<Self, (String, Option<Self>)> {
|
||||
match Markdown::build(actions, base, gemtext) {
|
||||
Ok(widget) => Ok(Self {
|
||||
scrolled_window: reader(&widget.text_view),
|
||||
text_view: widget.text_view,
|
||||
meta: Meta {
|
||||
title: widget.title,
|
||||
},
|
||||
}),
|
||||
Err(e) => match e {
|
||||
markdown::Error::Markup(message, widget) => Err((
|
||||
message,
|
||||
Some(Self {
|
||||
scrolled_window: reader(&widget.text_view),
|
||||
text_view: widget.text_view,
|
||||
meta: Meta {
|
||||
title: widget.title,
|
||||
},
|
||||
}),
|
||||
)),
|
||||
) -> Self {
|
||||
let markdown = Markdown::build(actions, base, gemtext);
|
||||
Self {
|
||||
scrolled_window: reader(&markdown.text_view),
|
||||
text_view: markdown.text_view,
|
||||
meta: Meta {
|
||||
title: markdown.title,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue