aboutsummaryrefslogtreecommitdiff
path: root/lib/xesite_markdown/src
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2023-03-28 18:06:33 -0400
committerXe Iaso <me@xeiaso.net>2023-03-28 18:06:37 -0400
commit3b940171e3c6c38352e357c8dab8cdf305c4fdc0 (patch)
tree63f7058b650f683adfe9ad704af638ee2a61dbd0 /lib/xesite_markdown/src
parent06803ef3c5c88367f4efdba444cef0cd39841b92 (diff)
downloadxesite-3b940171e3c6c38352e357c8dab8cdf305c4fdc0.tar.xz
xesite-3b940171e3c6c38352e357c8dab8cdf305c4fdc0.zip
bump comrak from 0.16.0 to 0.17.0
Replaces #630 Fixes GHSA-8hqf-xjwp-p67v Fixes GHSA-xxmq-4vph-956w Fixes GHSA-5r3x-p7xx-x6q5 Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'lib/xesite_markdown/src')
-rw-r--r--lib/xesite_markdown/src/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/xesite_markdown/src/lib.rs b/lib/xesite_markdown/src/lib.rs
index 008a4ca..11099f6 100644
--- a/lib/xesite_markdown/src/lib.rs
+++ b/lib/xesite_markdown/src/lib.rs
@@ -9,7 +9,7 @@ use lazy_static::lazy_static;
use lol_html::{element, html_content::ContentType, rewrite_str, RewriteStrSettings};
use maud::PreEscaped;
use sha2::{Digest, Sha256};
-use std::{cell::RefCell, io::Write};
+use std::{cell::RefCell, fmt::Write};
use url::Url;
use xesite_types::mastodon::{Toot, User};
@@ -52,7 +52,7 @@ pub fn render(inp: &str) -> Result<String> {
match &mut data.value {
&mut NodeValue::Link(ref mut link) => {
let base = Url::parse("https://xeiaso.net/")?;
- let u = base.join(std::str::from_utf8(&link.url.clone())?)?;
+ let u = base.join(&link.url.clone())?;
if u.scheme() != "conversation" {
return Ok(());
}
@@ -69,7 +69,7 @@ pub fn render(inp: &str) -> Result<String> {
let mood = without_first(u.path());
let name = u.host_str().unwrap_or("Mara");
- let mut html = vec![];
+ let mut html = String::new();
write!(
html,
"{}",