Fix image href pointing to non existent files

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/4/head v0.30.5
trivernis 4 years ago
parent b379fcbea9
commit d42821a6eb
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

2
Cargo.lock generated

@ -1908,7 +1908,7 @@ checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
[[package]] [[package]]
name = "snekdown" name = "snekdown"
version = "0.30.4" version = "0.30.5"
dependencies = [ dependencies = [
"asciimath-rs", "asciimath-rs",
"base64 0.12.3", "base64 0.12.3",

@ -1,6 +1,6 @@
[package] [package]
name = "snekdown" name = "snekdown"
version = "0.30.4" version = "0.30.5"
authors = ["trivernis <trivernis@protonmail.com>"] authors = ["trivernis <trivernis@protonmail.com>"]
edition = "2018" edition = "2018"
license-file = "LICENSE" license-file = "LICENSE"

@ -420,7 +420,7 @@ impl ToHtml for Image {
} }
if let Some(description) = self.url.description.clone() { if let Some(description) = self.url.description.clone() {
writer.write("<div class=\"figure\"><a href=\"".to_string())?; writer.write("<div class=\"figure\"><a href=\"".to_string())?;
writer.write_attribute(self.url.url.clone())?; writer.write_attribute(url.clone())?;
writer.write("\"><img src=\"".to_string())?; writer.write("\"><img src=\"".to_string())?;
writer.write(url)?; writer.write(url)?;
writer.write("\" style=\"".to_string())?; writer.write("\" style=\"".to_string())?;

Loading…
Cancel
Save