From 1d92666865b35341e076efbefddf6e73b5e1542e Mon Sep 17 00:00:00 2001
From: Titus Wormer Foo <33> <__> <a h*#ref="hi"> <a href="hi'> <a href=hi'> < a><\nfoo><bar/ >\n<foo bar=baz\nbim!bop /> <a href='bar'title=title>
</a href="foo">
", "should not support closing tags w/ attributes" ); assert_eq!( - micromark_with_options("foo ", &danger), + micromark_with_options("foo ", &danger)?, "foo
", "should support comments" ); assert_eq!( - micromark_with_options("foo ", &danger), + micromark_with_options("foo ", &danger)?, "foo <!-- not a comment -- two hyphens -->
", "should not support comments w/ two dashes inside" ); assert_eq!( - micromark_with_options("foo foo -->", &danger), + micromark_with_options("foo foo -->", &danger)?, "foo <!--> foo -->
", "should not support nonconforming comments (1)" ); assert_eq!( - micromark_with_options("foo ", &danger), + micromark_with_options("foo ", &danger)?, "foo <!-- foo--->
", "should not support nonconforming comments (2)" ); assert_eq!( - micromark_with_options("foo ", &danger), + micromark_with_options("foo ", &danger)?, "foo
", "should support instructions" ); assert_eq!( - micromark_with_options("foo ", &danger), + micromark_with_options("foo ", &danger)?, "foo
", "should support declarations" ); assert_eq!( - micromark_with_options("foo &<]]>", &danger), + micromark_with_options("foo &<]]>", &danger)?, "foo &<]]>
", "should support cdata" ); assert_eq!( - micromark_with_options("foo ", &danger), + micromark_with_options("foo ", &danger)?, "", "should support (ignore) character references" ); assert_eq!( - micromark_with_options("foo ", &danger), + micromark_with_options("foo ", &danger)?, "", "should not support character escapes (1)" ); assert_eq!( - micromark_with_options("", &danger), + micromark_with_options("", &danger)?, "<a href=""">
", "should not support character escapes (2)" ); // Extra: assert_eq!( - micromark_with_options("foo ", &danger), + micromark_with_options("foo ", &danger)?, "foo <!1>
", "should not support non-comment, non-cdata, and non-named declaration" ); assert_eq!( - micromark_with_options("foo ", &danger), + micromark_with_options("foo ", &danger)?, "foo <!-not enough!-->
", "should not support comments w/ not enough dashes" ); assert_eq!( - micromark_with_options("foo ", &danger), + micromark_with_options("foo ", &danger)?, "foo
", "should support comments that start w/ a dash, if it’s not followed by a greater than" ); assert_eq!( - micromark_with_options("foo ", &danger), + micromark_with_options("foo ", &danger)?, "foo <!--->
", "should not support comments that start w/ `->`" ); assert_eq!( - micromark_with_options("foo ", &danger), + micromark_with_options("foo ", &danger)?, "foo
", "should support `->` in a comment" ); assert_eq!( - micromark_with_options("foo