From 88064409a6fdf26d38039823005486daf89d1972 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sun, 16 Feb 2025 15:46:26 -0500 Subject: [PATCH] Add support for PNGs. --- src/intermediate/regular_link.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/intermediate/regular_link.rs b/src/intermediate/regular_link.rs index 5dec971..63544e0 100644 --- a/src/intermediate/regular_link.rs +++ b/src/intermediate/regular_link.rs @@ -73,7 +73,8 @@ impl LinkTarget { ) -> Result { // If link type is file and the path ends in .svg then make it an image target if let LinkType::File = link_type - && input.to_ascii_lowercase().ends_with(".svg") + && (input.to_ascii_lowercase().ends_with(".svg") + || input.to_ascii_lowercase().ends_with(".png")) { let src = Self::get_image_src(&input)?; let alt = Self::get_image_alt(&input)?;