diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-07-04 12:16:51 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-07-04 12:16:58 +0200 |
commit | faca28020f4894bdfcf5a4b164ebbc75864d8776 (patch) | |
tree | 93377413ae8c355e2d804f7e700241693b228e70 /tests/image.rs | |
parent | e1cae8c705e66669d043f5269e9f58c09c7b0eaa (diff) | |
download | markdown-rs-faca28020f4894bdfcf5a4b164ebbc75864d8776.tar.gz markdown-rs-faca28020f4894bdfcf5a4b164ebbc75864d8776.tar.bz2 markdown-rs-faca28020f4894bdfcf5a4b164ebbc75864d8776.zip |
Add support for attention (emphasis, strong)
Diffstat (limited to '')
-rw-r--r-- | tests/image.rs | 55 |
1 files changed, 25 insertions, 30 deletions
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*]"), - // "<p><img src=\"train.jpg\" alt=\"foo bar\" title=\"train & tracks\" /></p>", - // "should support image as shortcut reference" - // ); + assert_eq!( + micromark("[foo *bar*]: train.jpg \"train & tracks\"\n\n![foo *bar*]"), + "<p><img src=\"train.jpg\" alt=\"foo bar\" title=\"train & tracks\" /></p>", + "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*][]"), - // "<p><img src=\"train.jpg\" alt=\"foo bar\" title=\"train & tracks\" /></p>", - // "should support “content” in images" - // ); + assert_eq!( + micromark("[foo *bar*]: train.jpg \"train & tracks\"\n\n![foo *bar*][]"), + "<p><img src=\"train.jpg\" alt=\"foo bar\" title=\"train & tracks\" /></p>", + "should support “content” in images" + ); - // To do: attention. - // assert_eq!( - // micromark("[FOOBAR]: train.jpg \"train & tracks\"\n\n![foo *bar*][foobar]"), - // "<p><img src=\"train.jpg\" alt=\"foo bar\" title=\"train & tracks\" /></p>", - // "should support “content” in images" - // ); + assert_eq!( + micromark("[FOOBAR]: train.jpg \"train & tracks\"\n\n![foo *bar*][foobar]"), + "<p><img src=\"train.jpg\" alt=\"foo bar\" title=\"train & tracks\" /></p>", + "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][]"), - // "<p><img src=\"/url\" alt=\"foo bar\" title=\"title\" /></p>", - // "should support collapsed references (2)" - // ); + assert_eq!( + micromark("[*foo* bar]: /url \"title\"\n\n![*foo* bar][]"), + "<p><img src=\"/url\" alt=\"foo bar\" title=\"title\" /></p>", + "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]"), - // "<p><img src=\"/url\" alt=\"foo bar\" title=\"title\" /></p>", - // "should support shortcut references (2)" - // ); + assert_eq!( + micromark("[*foo* bar]: /url \"title\"\n\n![*foo* bar]"), + "<p><img src=\"/url\" alt=\"foo bar\" title=\"title\" /></p>", + "should support shortcut references (2)" + ); assert_eq!( micromark("[[foo]]: /url \"title\"\n\n![[foo]]"), |