forked from cadey/maj
Fix dependant workspace members
This commit is contained in:
parent
3dadcc05ba
commit
5a6208dedf
|
@ -224,7 +224,7 @@ pub fn render(body: &str) -> StyledString {
|
||||||
styled.append(StyledString::styled(name, Style::from(Effect::Underline)))
|
styled.append(StyledString::styled(name, Style::from(Effect::Underline)))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Preformatted(data) => styled.append(StyledString::plain(data)),
|
Preformatted { body, .. } => styled.append(StyledString::plain(body)),
|
||||||
Heading { level, body } => styled.append(StyledString::styled(
|
Heading { level, body } => styled.append(StyledString::styled(
|
||||||
format!("{} {}", "#".repeat(level as usize), body),
|
format!("{} {}", "#".repeat(level as usize), body),
|
||||||
Style::from(Effect::Bold),
|
Style::from(Effect::Bold),
|
||||||
|
|
|
@ -25,7 +25,7 @@ fn gem_to_md(tcana: Vec<Node>, out: &mut impl Write) -> io::Result<()> {
|
||||||
Some(name) => write!(out, "[{}]({})\n\n", name, to)?,
|
Some(name) => write!(out, "[{}]({})\n\n", name, to)?,
|
||||||
None => write!(out, "[{0}]({0})", to)?,
|
None => write!(out, "[{0}]({0})", to)?,
|
||||||
},
|
},
|
||||||
Preformatted(body) => write!(out, "```\n{}\n```\n\n", body)?,
|
Preformatted { alt, body } => write!(out, "```{}\n{}\n```\n\n", alt, body)?,
|
||||||
Heading { level, body } => {
|
Heading { level, body } => {
|
||||||
write!(out, "##{} {}\n\n", "#".repeat(level as usize), body)?
|
write!(out, "##{} {}\n\n", "#".repeat(level as usize), body)?
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,7 +80,12 @@ fn gemtext_to_html(inp: Vec<u8>) -> (String, impl ToHtml) {
|
||||||
name.as_ref().or(Some(&to.to_string())).unwrap()
|
name.as_ref().or(Some(&to.to_string())).unwrap()
|
||||||
)
|
)
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
Preformatted(body) => write!(buf, "<code><pre>{}</pre></code>", body).unwrap(),
|
Preformatted { alt, body } => write!(
|
||||||
|
buf,
|
||||||
|
"<code><pre title = \"{}\">{}</pre></code>",
|
||||||
|
alt.replace("\"", "\\\"").replace("\\", "\\\\"),
|
||||||
|
body
|
||||||
|
).unwrap(),
|
||||||
ListItem(body) => write!(buf, "<li>{}</li>", body).unwrap(),
|
ListItem(body) => write!(buf, "<li>{}</li>", body).unwrap(),
|
||||||
Quote(body) => write!(buf, "<blockquote>{}</blockquote>", body).unwrap(),
|
Quote(body) => write!(buf, "<blockquote>{}</blockquote>", body).unwrap(),
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ async fn dice(req: Request) -> Result<Response, Error> {
|
||||||
.text("")
|
.text("")
|
||||||
.text(format!("You rolled {} and you got:", dice))
|
.text(format!("You rolled {} and you got:", dice))
|
||||||
.text("")
|
.text("")
|
||||||
.preformatted(format!("{}", dice_roll(dice)?))
|
.preformatted("", format!("{}", dice_roll(dice)?))
|
||||||
.text("")
|
.text("")
|
||||||
.link("/dice", Some("Do another roll".to_string()));
|
.link("/dice", Some("Do another roll".to_string()));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue