diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-09-05 16:06:02 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-09-05 16:06:02 +0200 |
commit | 1ba9f2c632fb6c9e57f8ad2213894d4f1235677d (patch) | |
tree | dcf50fb7277239cda442000db150d910bfe9964a /tests | |
parent | 57673d17336371ca5a98cd8d0ce2b01137b43431 (diff) | |
download | markdown-rs-1ba9f2c632fb6c9e57f8ad2213894d4f1235677d.tar.gz markdown-rs-1ba9f2c632fb6c9e57f8ad2213894d4f1235677d.tar.bz2 markdown-rs-1ba9f2c632fb6c9e57f8ad2213894d4f1235677d.zip |
Add support for `mailto:`, `xmpp:` protocols
Diffstat (limited to '')
-rw-r--r-- | tests/gfm_autolink_literal.rs | 43 |
1 files changed, 43 insertions, 0 deletions
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 @@ -228,6 +228,49 @@ fn gfm_autolink_literal() { 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###"<p><a href="mailto:scyther@pokemon.com">mailto:scyther@pokemon.com</a></p> +<p>This is a <a href="mailto:scyther@pokemon.com">mailto:scyther@pokemon.com</a></p> +<p><a href="mailto:scyther@pokemon.com">mailto:scyther@pokemon.com</a>.</p> +<p>mmmmailto:<a href="mailto:scyther@pokemon.com">scyther@pokemon.com</a></p> +<p><a href="mailto:scyther@pokemon.com">mailto:scyther@pokemon.com</a>/</p> +<p><a href="mailto:scyther@pokemon.com">mailto:scyther@pokemon.com</a>/message</p> +<p><a href="mailto:scyther@pokemon.com">mailto:scyther@pokemon.com</a>/<a href="mailto:beedrill@pokemon.com">mailto:beedrill@pokemon.com</a></p> +<p><a href="xmpp:scyther@pokemon.com">xmpp:scyther@pokemon.com</a></p> +<p><a href="xmpp:scyther@pokemon.com">xmpp:scyther@pokemon.com</a>.</p> +<p><a href="xmpp:scyther@pokemon.com/message">xmpp:scyther@pokemon.com/message</a></p> +<p><a href="xmpp:scyther@pokemon.com/message">xmpp:scyther@pokemon.com/message</a>.</p> +<p>Email me at:<a href="mailto:scyther@pokemon.com">scyther@pokemon.com</a></p>"###, + "should support `mailto:` and `xmpp:` protocols" + ); + + assert_eq!( + micromark_with_options( + r###" a www.example.com&xxx;b c a www.example.com&xxx;. b |