From 3b083d023a8b6c7d4fe6b1140df90c907230b152 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Mon, 4 Jul 2022 13:45:32 +0200 Subject: Fix opening/closing tag order of nested attention --- tests/attention.rs | 67 +++++++++++++++++++++++++----------------------------- 1 file changed, 31 insertions(+), 36 deletions(-) (limited to 'tests') diff --git a/tests/attention.rs b/tests/attention.rs index 221b265..11ba7d8 100644 --- a/tests/attention.rs +++ b/tests/attention.rs @@ -386,12 +386,11 @@ fn attention() { "should not support adjacent emphasis in certain cases" ); - // To do: `edit_map`: insert before. - // assert_eq!( - // micromark("***foo** bar*"), - // "

foo bar

", - // "complex (1)" - // ); + assert_eq!( + micromark("***foo** bar*"), + "

foo bar

", + "complex (1)" + ); assert_eq!( micromark("*foo **bar***"), "

foo bar

", @@ -403,12 +402,11 @@ fn attention() { "complex (3)" ); - // To do: `edit_map`: insert before. - // assert_eq!( - // micromark("foo***bar***baz"), - // "

foobarbaz

", - // "complex (a)" - // ); + assert_eq!( + micromark("foo***bar***baz"), + "

foobarbaz

", + "complex (a)" + ); assert_eq!( micromark("foo******bar*********baz"), "

foobar***baz

", @@ -488,12 +486,11 @@ fn attention() { "should support nesting emphasis and strong (6)" ); - // To do: `edit_map`: insert before. - // assert_eq!( - // micromark("***foo* bar**"), - // "

foo bar

", - // "should support nesting emphasis and strong (7)" - // ); + assert_eq!( + micromark("***foo* bar**"), + "

foo bar

", + "should support nesting emphasis and strong (7)" + ); assert_eq!( micromark("**foo *bar***"), @@ -562,7 +559,7 @@ fn attention() { "should support strong emphasis around the other marker" ); - // To do: `edit_map`: insert before / resizing attention bug? + // To do: resizing attention bug? // assert_eq!( // micromark("**foo*"), // "

*foo

", @@ -575,14 +572,14 @@ fn attention() { "should support a superfluous marker at the end of emphasis" ); - // To do: `edit_map`: insert before / resizing attention bug? + // To do: resizing attention bug? // assert_eq!( // micromark("***foo**"), // "

*foo

", // "should support a superfluous marker at the start of strong" // ); - // To do: `edit_map`: insert before / resizing attention bug? + // To do: resizing attention bug? // assert_eq!( // micromark("****foo*"), // "

***foo

", @@ -638,7 +635,7 @@ fn attention() { "should support strong emphasis around the other marker" ); - // To do: `edit_map`: insert before / resizing attention bug? + // To do: resizing attention bug? // assert_eq!( // micromark("__foo_"), // "

_foo

", @@ -651,14 +648,14 @@ fn attention() { "should support a superfluous marker at the end of emphasis" ); - // To do: `edit_map`: insert before / resizing attention bug? + // To do: resizing attention bug? // assert_eq!( // micromark("___foo__"), // "

_foo

", // "should support a superfluous marker at the start of strong" // ); - // To do: `edit_map`: insert before / resizing attention bug? + // To do: resizing attention bug? // assert_eq!( // micromark("____foo_"), // "

___foo

", @@ -721,19 +718,17 @@ fn attention() { ); // Rule 14. - // To do: `edit_map`: insert before. - // assert_eq!( - // micromark("***foo***"), - // "

foo

", - // "should support strong directly in emphasis w/ `*`" - // ); + assert_eq!( + micromark("***foo***"), + "

foo

", + "should support strong directly in emphasis w/ `*`" + ); - // To do: `edit_map`: insert before. - // assert_eq!( - // micromark("___foo___"), - // "

foo

", - // "should support strong directly in emphasis w/ `_`" - // ); + assert_eq!( + micromark("___foo___"), + "

foo

", + "should support strong directly in emphasis w/ `_`" + ); // Rule 15. // To do: interleaving attention. -- cgit