From faca28020f4894bdfcf5a4b164ebbc75864d8776 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Mon, 4 Jul 2022 12:16:51 +0200 Subject: Add support for attention (emphasis, strong) --- tests/image.rs | 55 +++++++++++++++++++++++++------------------------------ 1 file changed, 25 insertions(+), 30 deletions(-) (limited to 'tests/image.rs') diff --git a/tests/image.rs b/tests/image.rs index 6db6d75..32d4171 100644 --- a/tests/image.rs +++ b/tests/image.rs @@ -14,12 +14,11 @@ fn image() { "should support image w/ resource" ); - // To do: attention. - // assert_eq!( - // micromark("[foo *bar*]: train.jpg \"train & tracks\"\n\n![foo *bar*]"), - // "

\"foo

", - // "should support image as shortcut reference" - // ); + assert_eq!( + micromark("[foo *bar*]: train.jpg \"train & tracks\"\n\n![foo *bar*]"), + "

\"foo

", + "should support image as shortcut reference" + ); assert_eq!( micromark("![foo ![bar](/url)](/url2)"), @@ -33,19 +32,17 @@ fn image() { "should “support” links in images" ); - // To do: attention. - // assert_eq!( - // micromark("[foo *bar*]: train.jpg \"train & tracks\"\n\n![foo *bar*][]"), - // "

\"foo

", - // "should support “content” in images" - // ); + assert_eq!( + micromark("[foo *bar*]: train.jpg \"train & tracks\"\n\n![foo *bar*][]"), + "

\"foo

", + "should support “content” in images" + ); - // To do: attention. - // assert_eq!( - // micromark("[FOOBAR]: train.jpg \"train & tracks\"\n\n![foo *bar*][foobar]"), - // "

\"foo

", - // "should support “content” in images" - // ); + assert_eq!( + micromark("[FOOBAR]: train.jpg \"train & tracks\"\n\n![foo *bar*][foobar]"), + "

\"foo

", + "should support “content” in images" + ); assert_eq!( micromark("![foo](train.jpg)"), @@ -89,12 +86,11 @@ fn image() { "should support collapsed references (1)" ); - // To do: attention. - // assert_eq!( - // micromark("[*foo* bar]: /url \"title\"\n\n![*foo* bar][]"), - // "

\"foo

", - // "should support collapsed references (2)" - // ); + assert_eq!( + micromark("[*foo* bar]: /url \"title\"\n\n![*foo* bar][]"), + "

\"foo

", + "should support collapsed references (2)" + ); assert_eq!( micromark("[foo]: /url \"title\"\n\n![Foo][]"), @@ -114,12 +110,11 @@ fn image() { "should support shortcut references (1)" ); - // To do: attention. - // assert_eq!( - // micromark("[*foo* bar]: /url \"title\"\n\n![*foo* bar]"), - // "

\"foo

", - // "should support shortcut references (2)" - // ); + assert_eq!( + micromark("[*foo* bar]: /url \"title\"\n\n![*foo* bar]"), + "

\"foo

", + "should support shortcut references (2)" + ); assert_eq!( micromark("[[foo]]: /url \"title\"\n\n![[foo]]"), -- cgit