diff --git a/src/render.rs b/src/render.rs index 3b7fb8d198..9e1623efa1 100644 --- a/src/render.rs +++ b/src/render.rs @@ -391,6 +391,7 @@ mod tests { let absolute = "[hi](/hi)"; let relative = "[there](there)"; let image = "![alt](img.png)"; + let html_image = ""; let svg = "![alt](sanitize.svg)"; for host in &["github.com", "gitlab.com", "bitbucket.org"] { @@ -429,6 +430,15 @@ mod tests { ) ); + let result = markdown_to_html(html_image, Some(&url)); + assert_eq!( + result, + format!( + "\n", + host + ) + ); + let result = markdown_to_html(svg, Some(&url)); assert_eq!( result, @@ -520,4 +530,15 @@ mod tests { "