Skip to content

Commit af00a2e

Browse files
committed
Add tests for custom url scheme
1 parent 0585a1f commit af00a2e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

components/rendering/tests/markdown.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,3 +819,15 @@ fn doesnt_try_to_highlight_content_from_shortcode() {
819819
// let res = render_content(markdown_string, &context).unwrap();
820820
// assert_eq!(res.body, expected);
821821
//}
822+
823+
824+
// https://github.com/getzola/zola/issues/747
825+
#[test]
826+
fn leaves_custom_url_scheme_untouched() {
827+
let tera_ctx = Tera::default();
828+
let permalinks_ctx = HashMap::new();
829+
let config = Config::default();
830+
let context = RenderContext::new(&tera_ctx, &config, "", &permalinks_ctx, InsertAnchor::None);
831+
let res = render_content("[[email protected]](xmpp:[email protected])", &context).unwrap();
832+
assert_eq!(res.body, "<p><a href=\"xmpp:[email protected]\">[email protected]</a></p>\n");
833+
}

0 commit comments

Comments
 (0)