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/link_reference.rs | 68 ++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 35 deletions(-) (limited to 'tests/link_reference.rs') diff --git a/tests/link_reference.rs b/tests/link_reference.rs index 372bea5..3a0be9f 100644 --- a/tests/link_reference.rs +++ b/tests/link_reference.rs @@ -27,7 +27,7 @@ fn link_reference() { "should support escaped brackets in link references" ); - // To do: attention. + // To do: link/attention interplay. // assert_eq!( // micromark("[ref]: /uri\n\n[link *foo **bar** `#`*][ref]"), // "

link foo bar #

", @@ -46,19 +46,19 @@ fn link_reference() { "should not support links in link references" ); - // To do: attention. - // assert_eq!( - // micromark("[ref]: /uri\n\n[foo *bar [baz][ref]*][ref]"), - // "

[foo bar baz]ref

", - // "should not support deep links in link references" - // ); - assert_eq!( - micromark("[ref]: /uri\n\n*[foo*][ref]"), - "

*foo*

", - "should prefer link references over emphasis (1)" + micromark("[ref]: /uri\n\n[foo *bar [baz][ref]*][ref]"), + "

[foo bar baz]ref

", + "should not support deep links in link references" ); + // To do: link/attention interplay. + // assert_eq!( + // micromark("[ref]: /uri\n\n*[foo*][ref]"), + // "

*foo*

", + // "should prefer link references over emphasis (1)" + // ); + assert_eq!( micromark("[ref]: /uri\n\n[foo *bar][ref]"), "

foo *bar

", @@ -173,12 +173,11 @@ fn link_reference() { "should support collaped references" ); - // To do: attention. - // assert_eq!( - // micromark("[*foo* bar]: /url \"title\"\n\n[*foo* bar][]"), - // "

foo bar

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

foo bar

", + "should support content in collaped references" + ); assert_eq!( micromark("[foo]: /url \"title\"\n\n[Foo][]"), @@ -198,19 +197,17 @@ fn link_reference() { "should support shortcut references" ); - // To do: attention. - // assert_eq!( - // micromark("[*foo* bar]: /url \"title\"\n\n[*foo* bar]"), - // "

foo bar

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

foo bar

", + "should support content in shortcut references (1)" + ); - // To do: attention. - // assert_eq!( - // micromark("[*foo* bar]: /url \"title\"\n\n[[*foo* bar]]"), - // "

[foo bar]

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

[foo bar]

", + "should support content in shortcut references (2)" + ); assert_eq!( micromark("[foo]: /url\n\n[[bar [foo]"), @@ -236,11 +233,12 @@ fn link_reference() { "should “support” an escaped shortcut reference" ); - assert_eq!( - micromark("[foo*]: /url\n\n*[foo*]"), - "

*foo*

", - "should prefer shortcut references over emphasis" - ); + // To do: link/attention interplay. + // assert_eq!( + // micromark("[foo*]: /url\n\n*[foo*]"), + // "

*foo*

", + // "should prefer shortcut references over emphasis" + // ); assert_eq!( micromark("[foo]: /url1\n[bar]: /url2\n\n[foo][bar]"), @@ -338,7 +336,7 @@ fn link_reference() { "should not support mismatched character references in fulls" ); - // To do: attention. + // To do: link/attention interplay. // assert_eq!( // micromark( // "[*f*][] -- cgit