From af00a2e8f1bf1e077225c53b8dbe8db69a1c3709 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Mon, 15 Jul 2019 20:18:24 +0200 Subject: [PATCH] Add tests for custom url scheme --- components/rendering/tests/markdown.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/components/rendering/tests/markdown.rs b/components/rendering/tests/markdown.rs index 517e163..42c4768 100644 --- a/components/rendering/tests/markdown.rs +++ b/components/rendering/tests/markdown.rs @@ -819,3 +819,15 @@ fn doesnt_try_to_highlight_content_from_shortcode() { // let res = render_content(markdown_string, &context).unwrap(); // assert_eq!(res.body, expected); //} + + +// https://github.com/getzola/zola/issues/747 +#[test] +fn leaves_custom_url_scheme_untouched() { + let tera_ctx = Tera::default(); + let permalinks_ctx = HashMap::new(); + let config = Config::default(); + let context = RenderContext::new(&tera_ctx, &config, "", &permalinks_ctx, InsertAnchor::None); + let res = render_content("[foo@bar.tld](xmpp:foo@bar.tld)", &context).unwrap(); + assert_eq!(res.body, "

foo@bar.tld

\n"); +}