diff --git a/Cargo.lock b/Cargo.lock index 272839c..0b3ff0c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1117,7 +1117,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "snekdown" -version = "0.22.3" +version = "0.22.4" dependencies = [ "asciimath-rs 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "base64 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index ee1b068..390c4a2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snekdown" -version = "0.22.3" +version = "0.22.4" authors = ["trivernis "] edition = "2018" license-file = "LICENSE" diff --git a/src/parser/inline.rs b/src/parser/inline.rs index d8ecf51..34d68f0 100644 --- a/src/parser/inline.rs +++ b/src/parser/inline.rs @@ -7,7 +7,6 @@ use crate::references::configuration::keys::BIB_REF_DISPLAY; use crate::references::templates::{GetTemplateVariables, Template, TemplateVariable}; use crate::Parser; use std::collections::HashMap; -use std::path::PathBuf; use std::sync::{Arc, RwLock}; pub(crate) trait ParseInline { @@ -146,9 +145,9 @@ impl ParseInline for Parser { .get_string_until_any_or_rewind(&[URL_CLOSE], &[LB], start_index)?; self.ctm.seek_one()?; - let url_path = PathBuf::from(url.clone()); + let url_path = self.transform_path(url.clone()); if url_path.exists() { - url = self.transform_path(url).to_str().unwrap().to_string() + url = url_path.to_str().unwrap().to_string(); } if description.len() > 0 {