From 21c681fc8aa1f4c2d434351fe44994cf960ab4df Mon Sep 17 00:00:00 2001 From: CrispyPin Date: Tue, 27 Aug 2024 19:04:52 +0200 Subject: [PATCH] lazy loading for media macros --- src/convert.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/convert.rs b/src/convert.rs index 7b99491..37eb5db 100644 --- a/src/convert.rs +++ b/src/convert.rs @@ -45,7 +45,7 @@ pub fn convert_document(markdown: &str) -> String { if let Some(img_info) = line.strip_prefix("==image:") { let (src, alt) = img_info.split_once(':').unwrap(); - html += &format!("{alt}\n"); + html += &format!("{alt}\n"); continue; } @@ -54,12 +54,12 @@ pub fn convert_document(markdown: &str) -> String { let src = attributes.next().unwrap(); let alt = attributes.next().unwrap_or_else(|| &"\"\""); let extra = attributes.next().unwrap_or_default(); - html += &format!("\n"); + html += &format!("\n"); continue; } if let Some(youtube_id) = line.strip_prefix("==youtube:") { - html += &format!("https://youtu.be/{youtube_id}"); + html += &format!("https://youtu.be/{youtube_id}\n"); continue; }