From 71a0c33ec705c8a226ee5e0ef63ec4055d0a05c5 Mon Sep 17 00:00:00 2001 From: ef3d0c3e Date: Thu, 25 Jul 2024 14:05:27 +0200 Subject: [PATCH] Minor fix --- src/elements/media.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/elements/media.rs b/src/elements/media.rs index f5eb62d..0dfe144 100644 --- a/src/elements/media.rs +++ b/src/elements/media.rs @@ -130,14 +130,14 @@ impl Element for Media { Target::HTML => { let mut result = String::new(); - result.push_str("
"); let width = self .width .as_ref() - .map_or(String::new(), |w| format!(r#" width="{w}""#)); + .map_or(String::new(), |w| format!(r#" style="width:{w};""#)); + result.push_str(format!(r#"
"#).as_str()); match self.media_type { MediaType::IMAGE => result.push_str( - format!(r#""#, self.uri).as_str(), + format!(r#""#, self.uri).as_str(), ), MediaType::VIDEO => todo!(), MediaType::AUDIO => todo!(),