Add support for PNGs.
Some checks failed
format Build format has succeeded
clippy Build clippy has failed
rust-test Build rust-test has succeeded
build Build build has succeeded

This commit is contained in:
Tom Alexander 2025-02-16 15:46:26 -05:00
parent 7c17087920
commit 88064409a6
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -73,7 +73,8 @@ impl LinkTarget {
) -> Result<LinkTarget, CustomError> {
// 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)?;