From 1ba9f2c632fb6c9e57f8ad2213894d4f1235677d Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Mon, 5 Sep 2022 16:06:02 +0200 Subject: Add support for `mailto:`, `xmpp:` protocols --- tests/gfm_autolink_literal.rs | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'tests/gfm_autolink_literal.rs') diff --git a/tests/gfm_autolink_literal.rs b/tests/gfm_autolink_literal.rs index 2e84e6d..0c646b6 100644 --- a/tests/gfm_autolink_literal.rs +++ b/tests/gfm_autolink_literal.rs @@ -225,6 +225,49 @@ fn gfm_autolink_literal() { "should stop domains/paths at `<`" ); + assert_eq!( + micromark_with_options( + r###" +mailto:scyther@pokemon.com + +This is a mailto:scyther@pokemon.com + +mailto:scyther@pokemon.com. + +mmmmailto:scyther@pokemon.com + +mailto:scyther@pokemon.com/ + +mailto:scyther@pokemon.com/message + +mailto:scyther@pokemon.com/mailto:beedrill@pokemon.com + +xmpp:scyther@pokemon.com + +xmpp:scyther@pokemon.com. + +xmpp:scyther@pokemon.com/message + +xmpp:scyther@pokemon.com/message. + +Email me at:scyther@pokemon.com"###, + &gfm + ), + r###"

mailto:scyther@pokemon.com

+

This is a mailto:scyther@pokemon.com

+

mailto:scyther@pokemon.com.

+

mmmmailto:scyther@pokemon.com

+

mailto:scyther@pokemon.com/

+

mailto:scyther@pokemon.com/message

+

mailto:scyther@pokemon.com/mailto:beedrill@pokemon.com

+

xmpp:scyther@pokemon.com

+

xmpp:scyther@pokemon.com.

+

xmpp:scyther@pokemon.com/message

+

xmpp:scyther@pokemon.com/message.

+

Email me at:scyther@pokemon.com

"###, + "should support `mailto:` and `xmpp:` protocols" + ); + assert_eq!( micromark_with_options( r###" -- cgit