From 437d3f8bd5633194406fb70b3567bfeb76f18ea5 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Fri, 15 Jul 2022 17:51:49 +0200 Subject: Add all commonmark tests --- tests/commonmark.rs | 9142 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 9142 insertions(+) create mode 100644 tests/commonmark.rs (limited to 'tests') diff --git a/tests/commonmark.rs b/tests/commonmark.rs new file mode 100644 index 0000000..dade5ff --- /dev/null +++ b/tests/commonmark.rs @@ -0,0 +1,9142 @@ +//! CommonMark test suite. + +// > 👉 **Important**: this module is generated by `build.rs`. +// > It is generate from the latest Unicode data. + +extern crate micromark; +use micromark::{micromark_with_options, Options}; + +const DANGER: &Options = &Options { + allow_dangerous_html: true, + allow_dangerous_protocol: true, + default_line_ending: None, +}; + +#[test] +fn commonmark() { + assert_eq!( + micromark_with_options( + r###" foo baz bim +"###, + DANGER + ), + r###"
foo	baz		bim
+
+"###, + r###"Tabs (0)"### + ); + + assert_eq!( + micromark_with_options( + r###" foo baz bim +"###, + DANGER + ), + r###"
foo	baz		bim
+
+"###, + r###"Tabs (1)"### + ); + + assert_eq!( + micromark_with_options( + r###" a a + ὐ a +"###, + DANGER + ), + r###"
a	a
+ὐ	a
+
+"###, + r###"Tabs (2)"### + ); + + assert_eq!( + micromark_with_options( + r###" - foo + + bar +"###, + DANGER + ), + r###" +"###, + r###"Tabs (3)"### + ); + + assert_eq!( + micromark_with_options( + r###"- foo + + bar +"###, + DANGER + ), + r###" +"###, + r###"Tabs (4)"### + ); + + assert_eq!( + micromark_with_options( + r###"> foo +"###, + DANGER + ), + r###"
+
  foo
+
+
+"###, + r###"Tabs (5)"### + ); + + assert_eq!( + micromark_with_options( + r###"- foo +"###, + DANGER + ), + r###" +"###, + r###"Tabs (6)"### + ); + + assert_eq!( + micromark_with_options( + r###" foo + bar +"###, + DANGER + ), + r###"
foo
+bar
+
+"###, + r###"Tabs (7)"### + ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options(r###" - foo + // - bar + // - baz + // "###, DANGER), + // r###" + // "###, + // r###"Tabs (8)"### + // ); + + assert_eq!( + micromark_with_options( + r###"# Foo +"###, + DANGER + ), + r###"

Foo

+"###, + r###"Tabs (9)"### + ); + + assert_eq!( + micromark_with_options( + r###"* * * +"###, + DANGER + ), + r###"
+"###, + r###"Tabs (10)"### + ); + + assert_eq!( + micromark_with_options( + r###"\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}\~ +"###, + DANGER + ), + r###"

!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~

+"###, + r###"Backslash escapes (11)"### + ); + + assert_eq!( + micromark_with_options( + r###"\ \A\a\ \3\φ\« +"###, + DANGER + ), + r###"

\ \A\a\ \3\φ\«

+"###, + r###"Backslash escapes (12)"### + ); + + assert_eq!( + micromark_with_options( + r###"\*not emphasized* +\
not a tag +\[not a link](/foo) +\`not code` +1\. not a list +\* not a list +\# not a heading +\[foo]: /url "not a reference" +\ö not a character entity +"###, + DANGER + ), + r###"

*not emphasized* +<br/> not a tag +[not a link](/foo) +`not code` +1. not a list +* not a list +# not a heading +[foo]: /url "not a reference" +&ouml; not a character entity

+"###, + r###"Backslash escapes (13)"### + ); + + assert_eq!( + micromark_with_options( + r###"\\*emphasis* +"###, + DANGER + ), + r###"

\emphasis

+"###, + r###"Backslash escapes (14)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo\ +bar +"###, + DANGER + ), + r###"

foo
+bar

+"###, + r###"Backslash escapes (15)"### + ); + + assert_eq!( + micromark_with_options( + r###"`` \[\` `` +"###, + DANGER + ), + r###"

\[\`

+"###, + r###"Backslash escapes (16)"### + ); + + assert_eq!( + micromark_with_options( + r###" \[\] +"###, + DANGER + ), + r###"
\[\]
+
+"###, + r###"Backslash escapes (17)"### + ); + + assert_eq!( + micromark_with_options( + r###"~~~ +\[\] +~~~ +"###, + DANGER + ), + r###"
\[\]
+
+"###, + r###"Backslash escapes (18)"### + ); + + assert_eq!( + micromark_with_options( + r###" +"###, + DANGER + ), + r###"

http://example.com?find=\*

+"###, + r###"Backslash escapes (19)"### + ); + + assert_eq!( + micromark_with_options( + r###" +"###, + DANGER + ), + r###" +"###, + r###"Backslash escapes (20)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo](/bar\* "ti\*tle") +"###, + DANGER + ), + r###"

foo

+"###, + r###"Backslash escapes (21)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo] + +[foo]: /bar\* "ti\*tle" +"###, + DANGER + ), + r###"

foo

+"###, + r###"Backslash escapes (22)"### + ); + + assert_eq!( + micromark_with_options( + r###"``` foo\+bar +foo +``` +"###, + DANGER + ), + r###"
foo
+
+"###, + r###"Backslash escapes (23)"### + ); + + // To do: bug. + // assert_eq!( + // micromark_with_options(r###"  & © Æ Ď + // ¾ ℋ ⅆ + // ∲ ≧̸ + // "###, DANGER), + // r###"

  & © Æ Ď + // ¾ ℋ ⅆ + // ∲ ≧̸

+ // "###, + // r###"Entity and numeric character references (24)"### + // ); + + assert_eq!( + micromark_with_options( + r###"# Ӓ Ϡ � +"###, + DANGER + ), + r###"

# Ӓ Ϡ �

+"###, + r###"Entity and numeric character references (25)"### + ); + + assert_eq!( + micromark_with_options( + r###"" ആ ಫ +"###, + DANGER + ), + r###"

" ആ ಫ

+"###, + r###"Entity and numeric character references (26)"### + ); + + assert_eq!( + micromark_with_options( + r###"  &x; &#; &#x; +� +&#abcdef0; +&ThisIsNotDefined; &hi?; +"###, + DANGER + ), + r###"

&nbsp &x; &#; &#x; +&#87654321; +&#abcdef0; +&ThisIsNotDefined; &hi?;

+"###, + r###"Entity and numeric character references (27)"### + ); + + assert_eq!( + micromark_with_options( + r###"© +"###, + DANGER + ), + r###"

&copy

+"###, + r###"Entity and numeric character references (28)"### + ); + + assert_eq!( + micromark_with_options( + r###"&MadeUpEntity; +"###, + DANGER + ), + r###"

&MadeUpEntity;

+"###, + r###"Entity and numeric character references (29)"### + ); + + assert_eq!( + micromark_with_options( + r###" +"###, + DANGER + ), + r###" +"###, + r###"Entity and numeric character references (30)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo](/föö "föö") +"###, + DANGER + ), + r###"

foo

+"###, + r###"Entity and numeric character references (31)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo] + +[foo]: /föö "föö" +"###, + DANGER + ), + r###"

foo

+"###, + r###"Entity and numeric character references (32)"### + ); + + assert_eq!( + micromark_with_options( + r###"``` föö +foo +``` +"###, + DANGER + ), + r###"
foo
+
+"###, + r###"Entity and numeric character references (33)"### + ); + + assert_eq!( + micromark_with_options( + r###"`föö` +"###, + DANGER + ), + r###"

f&ouml;&ouml;

+"###, + r###"Entity and numeric character references (34)"### + ); + + assert_eq!( + micromark_with_options( + r###" föfö +"###, + DANGER + ), + r###"
f&ouml;f&ouml;
+
+"###, + r###"Entity and numeric character references (35)"### + ); + + assert_eq!( + micromark_with_options( + r###"*foo* +*foo* +"###, + DANGER + ), + r###"

*foo* +foo

+"###, + r###"Entity and numeric character references (36)"### + ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options(r###"* foo + + // * foo + // "###, DANGER), + // r###"

* foo

+ // + // "###, + // r###"Entity and numeric character references (37)"### + // ); + + assert_eq!( + micromark_with_options( + r###"foo bar +"###, + DANGER + ), + r###"

foo + +bar

+"###, + r###"Entity and numeric character references (38)"### + ); + + assert_eq!( + micromark_with_options( + r###" foo +"###, + DANGER + ), + r###"

foo

+"###, + r###"Entity and numeric character references (39)"### + ); + + assert_eq!( + micromark_with_options( + r###"[a](url "tit") +"###, + DANGER + ), + r###"

[a](url "tit")

+"###, + r###"Entity and numeric character references (40)"### + ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options(r###"- `one + // - two` + // "###, DANGER), + // r###" + // "###, + // r###"Precedence (41)"### + // ); + + assert_eq!( + micromark_with_options( + r###"*** +--- +___ +"###, + DANGER + ), + r###"
+
+
+"###, + r###"Thematic breaks (42)"### + ); + + assert_eq!( + micromark_with_options( + r###"+++ +"###, + DANGER + ), + r###"

+++

+"###, + r###"Thematic breaks (43)"### + ); + + assert_eq!( + micromark_with_options( + r###"=== +"###, + DANGER + ), + r###"

===

+"###, + r###"Thematic breaks (44)"### + ); + + assert_eq!( + micromark_with_options( + r###"-- +** +__ +"###, + DANGER + ), + r###"

-- +** +__

+"###, + r###"Thematic breaks (45)"### + ); + + assert_eq!( + micromark_with_options( + r###" *** + *** + *** +"###, + DANGER + ), + r###"
+
+
+"###, + r###"Thematic breaks (46)"### + ); + + assert_eq!( + micromark_with_options( + r###" *** +"###, + DANGER + ), + r###"
***
+
+"###, + r###"Thematic breaks (47)"### + ); + + assert_eq!( + micromark_with_options( + r###"Foo + *** +"###, + DANGER + ), + r###"

Foo +***

+"###, + r###"Thematic breaks (48)"### + ); + + assert_eq!( + micromark_with_options( + r###"_____________________________________ +"###, + DANGER + ), + r###"
+"###, + r###"Thematic breaks (49)"### + ); + + assert_eq!( + micromark_with_options( + r###" - - - +"###, + DANGER + ), + r###"
+"###, + r###"Thematic breaks (50)"### + ); + + assert_eq!( + micromark_with_options( + r###" ** * ** * ** * ** +"###, + DANGER + ), + r###"
+"###, + r###"Thematic breaks (51)"### + ); + + assert_eq!( + micromark_with_options( + r###"- - - - +"###, + DANGER + ), + r###"
+"###, + r###"Thematic breaks (52)"### + ); + + assert_eq!( + micromark_with_options( + r###"- - - - +"###, + DANGER + ), + r###"
+"###, + r###"Thematic breaks (53)"### + ); + + assert_eq!( + micromark_with_options( + r###"_ _ _ _ a + +a------ + +---a--- +"###, + DANGER + ), + r###"

_ _ _ _ a

+

a------

+

---a---

+"###, + r###"Thematic breaks (54)"### + ); + + assert_eq!( + micromark_with_options( + r###" *-* +"###, + DANGER + ), + r###"

-

+"###, + r###"Thematic breaks (55)"### + ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options(r###"- foo + // *** + // - bar + // "###, DANGER), + // r###" + //
+ // + // "###, + // r###"Thematic breaks (56)"### + // ); + + assert_eq!( + micromark_with_options( + r###"Foo +*** +bar +"###, + DANGER + ), + r###"

Foo

+
+

bar

+"###, + r###"Thematic breaks (57)"### + ); + + assert_eq!( + micromark_with_options( + r###"Foo +--- +bar +"###, + DANGER + ), + r###"

Foo

+

bar

+"###, + r###"Thematic breaks (58)"### + ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options(r###"* Foo + // * * * + // * Bar + // "###, DANGER), + // r###" + //
+ // + // "###, + // r###"Thematic breaks (59)"### + // ); + + assert_eq!( + micromark_with_options( + r###"- Foo +- * * * +"###, + DANGER + ), + r###" +"###, + r###"Thematic breaks (60)"### + ); + + assert_eq!( + micromark_with_options( + r###"# foo +## foo +### foo +#### foo +##### foo +###### foo +"###, + DANGER + ), + r###"

foo

+

foo

+

foo

+

foo

+
foo
+
foo
+"###, + r###"ATX headings (61)"### + ); + + assert_eq!( + micromark_with_options( + r###"####### foo +"###, + DANGER + ), + r###"

####### foo

+"###, + r###"ATX headings (62)"### + ); + + assert_eq!( + micromark_with_options( + r###"#5 bolt + +#hashtag +"###, + DANGER + ), + r###"

#5 bolt

+

#hashtag

+"###, + r###"ATX headings (63)"### + ); + + assert_eq!( + micromark_with_options( + r###"\## foo +"###, + DANGER + ), + r###"

## foo

+"###, + r###"ATX headings (64)"### + ); + + assert_eq!( + micromark_with_options( + r###"# foo *bar* \*baz\* +"###, + DANGER + ), + r###"

foo bar *baz*

+"###, + r###"ATX headings (65)"### + ); + + assert_eq!( + micromark_with_options( + r###"# foo +"###, + DANGER + ), + r###"

foo

+"###, + r###"ATX headings (66)"### + ); + + assert_eq!( + micromark_with_options( + r###" ### foo + ## foo + # foo +"###, + DANGER + ), + r###"

foo

+

foo

+

foo

+"###, + r###"ATX headings (67)"### + ); + + assert_eq!( + micromark_with_options( + r###" # foo +"###, + DANGER + ), + r###"
# foo
+
+"###, + r###"ATX headings (68)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo + # bar +"###, + DANGER + ), + r###"

foo +# bar

+"###, + r###"ATX headings (69)"### + ); + + assert_eq!( + micromark_with_options( + r###"## foo ## + ### bar ### +"###, + DANGER + ), + r###"

foo

+

bar

+"###, + r###"ATX headings (70)"### + ); + + assert_eq!( + micromark_with_options( + r###"# foo ################################## +##### foo ## +"###, + DANGER + ), + r###"

foo

+
foo
+"###, + r###"ATX headings (71)"### + ); + + assert_eq!( + micromark_with_options( + r###"### foo ### +"###, + DANGER + ), + r###"

foo

+"###, + r###"ATX headings (72)"### + ); + + assert_eq!( + micromark_with_options( + r###"### foo ### b +"###, + DANGER + ), + r###"

foo ### b

+"###, + r###"ATX headings (73)"### + ); + + assert_eq!( + micromark_with_options( + r###"# foo# +"###, + DANGER + ), + r###"

foo#

+"###, + r###"ATX headings (74)"### + ); + + assert_eq!( + micromark_with_options( + r###"### foo \### +## foo #\## +# foo \# +"###, + DANGER + ), + r###"

foo ###

+

foo ###

+

foo #

+"###, + r###"ATX headings (75)"### + ); + + assert_eq!( + micromark_with_options( + r###"**** +## foo +**** +"###, + DANGER + ), + r###"
+

foo

+
+"###, + r###"ATX headings (76)"### + ); + + assert_eq!( + micromark_with_options( + r###"Foo bar +# baz +Bar foo +"###, + DANGER + ), + r###"

Foo bar

+

baz

+

Bar foo

+"###, + r###"ATX headings (77)"### + ); + + assert_eq!( + micromark_with_options( + r###"## +# +### ### +"###, + DANGER + ), + r###"

+

+

+"###, + r###"ATX headings (78)"### + ); + + assert_eq!( + micromark_with_options( + r###"Foo *bar* +========= + +Foo *bar* +--------- +"###, + DANGER + ), + r###"

Foo bar

+

Foo bar

+"###, + r###"Setext headings (79)"### + ); + + assert_eq!( + micromark_with_options( + r###"Foo *bar +baz* +==== +"###, + DANGER + ), + r###"

Foo bar +baz

+"###, + r###"Setext headings (80)"### + ); + + assert_eq!( + micromark_with_options( + r###" Foo *bar +baz* +==== +"###, + DANGER + ), + r###"

Foo bar +baz

+"###, + r###"Setext headings (81)"### + ); + + assert_eq!( + micromark_with_options( + r###"Foo +------------------------- + +Foo += +"###, + DANGER + ), + r###"

Foo

+

Foo

+"###, + r###"Setext headings (82)"### + ); + + assert_eq!( + micromark_with_options( + r###" Foo +--- + + Foo +----- + + Foo + === +"###, + DANGER + ), + r###"

Foo

+

Foo

+

Foo

+"###, + r###"Setext headings (83)"### + ); + + assert_eq!( + micromark_with_options( + r###" Foo + --- + + Foo +--- +"###, + DANGER + ), + r###"
Foo
+---
+
+Foo
+
+
+"###, + r###"Setext headings (84)"### + ); + + assert_eq!( + micromark_with_options( + r###"Foo + ---- +"###, + DANGER + ), + r###"

Foo

+"###, + r###"Setext headings (85)"### + ); + + assert_eq!( + micromark_with_options( + r###"Foo + --- +"###, + DANGER + ), + r###"

Foo +---

+"###, + r###"Setext headings (86)"### + ); + + assert_eq!( + micromark_with_options( + r###"Foo += = + +Foo +--- - +"###, + DANGER + ), + r###"

Foo += =

+

Foo

+
+"###, + r###"Setext headings (87)"### + ); + + assert_eq!( + micromark_with_options( + r###"Foo +----- +"###, + DANGER + ), + r###"

Foo

+"###, + r###"Setext headings (88)"### + ); + + assert_eq!( + micromark_with_options( + r###"Foo\ +---- +"###, + DANGER + ), + r###"

Foo\

+"###, + r###"Setext headings (89)"### + ); + + assert_eq!( + micromark_with_options( + r###"`Foo +---- +` + + +"###, + DANGER + ), + r###"

`Foo

+

`

+

<a title="a lot

+

of dashes"/>

+"###, + r###"Setext headings (90)"### + ); + + assert_eq!( + micromark_with_options( + r###"> Foo +--- +"###, + DANGER + ), + r###"
+

Foo

+
+
+"###, + r###"Setext headings (91)"### + ); + + // To do: setext heading interrupt? + // assert_eq!( + // micromark_with_options(r###"> foo + // bar + // === + // "###, DANGER), + // r###"
+ //

foo + // bar + // ===

+ //
+ // "###, + // r###"Setext headings (92)"### + // ); + + assert_eq!( + micromark_with_options( + r###"- Foo +--- +"###, + DANGER + ), + r###"
    +
  • Foo
  • +
+
+"###, + r###"Setext headings (93)"### + ); + + assert_eq!( + micromark_with_options( + r###"Foo +Bar +--- +"###, + DANGER + ), + r###"

Foo +Bar

+"###, + r###"Setext headings (94)"### + ); + + assert_eq!( + micromark_with_options( + r###"--- +Foo +--- +Bar +--- +Baz +"###, + DANGER + ), + r###"
+

Foo

+

Bar

+

Baz

+"###, + r###"Setext headings (95)"### + ); + + assert_eq!( + micromark_with_options( + r###" +==== +"###, + DANGER + ), + r###"

====

+"###, + r###"Setext headings (96)"### + ); + + assert_eq!( + micromark_with_options( + r###"--- +--- +"###, + DANGER + ), + r###"
+
+"###, + r###"Setext headings (97)"### + ); + + assert_eq!( + micromark_with_options( + r###"- foo +----- +"###, + DANGER + ), + r###"
    +
  • foo
  • +
+
+"###, + r###"Setext headings (98)"### + ); + + assert_eq!( + micromark_with_options( + r###" foo +--- +"###, + DANGER + ), + r###"
foo
+
+
+"###, + r###"Setext headings (99)"### + ); + + assert_eq!( + micromark_with_options( + r###"> foo +----- +"###, + DANGER + ), + r###"
+

foo

+
+
+"###, + r###"Setext headings (100)"### + ); + + assert_eq!( + micromark_with_options( + r###"\> foo +------ +"###, + DANGER + ), + r###"

> foo

+"###, + r###"Setext headings (101)"### + ); + + assert_eq!( + micromark_with_options( + r###"Foo + +bar +--- +baz +"###, + DANGER + ), + r###"

Foo

+

bar

+

baz

+"###, + r###"Setext headings (102)"### + ); + + assert_eq!( + micromark_with_options( + r###"Foo +bar + +--- + +baz +"###, + DANGER + ), + r###"

Foo +bar

+
+

baz

+"###, + r###"Setext headings (103)"### + ); + + assert_eq!( + micromark_with_options( + r###"Foo +bar +* * * +baz +"###, + DANGER + ), + r###"

Foo +bar

+
+

baz

+"###, + r###"Setext headings (104)"### + ); + + assert_eq!( + micromark_with_options( + r###"Foo +bar +\--- +baz +"###, + DANGER + ), + r###"

Foo +bar +--- +baz

+"###, + r###"Setext headings (105)"### + ); + + assert_eq!( + micromark_with_options( + r###" a simple + indented code block +"###, + DANGER + ), + r###"
a simple
+  indented code block
+
+"###, + r###"Indented code blocks (106)"### + ); + + assert_eq!( + micromark_with_options( + r###" - foo + + bar +"###, + DANGER + ), + r###"
    +
  • +

    foo

    +

    bar

    +
  • +
+"###, + r###"Indented code blocks (107)"### + ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options(r###"1. foo + + // - bar + // "###, DANGER), + // r###"
    + //
  1. + //

    foo

    + //
      + //
    • bar
    • + //
    + //
  2. + //
+ // "###, + // r###"Indented code blocks (108)"### + // ); + + assert_eq!( + micromark_with_options( + r###"
+ *hi* + + - one +"###, + DANGER + ), + r###"
<a/>
+*hi*
+
+- one
+
+"###, + r###"Indented code blocks (109)"### + ); + + assert_eq!( + micromark_with_options( + r###" chunk1 + + chunk2 + + + + chunk3 +"###, + DANGER + ), + r###"
chunk1
+
+chunk2
+
+
+
+chunk3
+
+"###, + r###"Indented code blocks (110)"### + ); + + assert_eq!( + micromark_with_options( + r###" chunk1 + + chunk2 +"###, + DANGER + ), + r###"
chunk1
+
+  chunk2
+
+"###, + r###"Indented code blocks (111)"### + ); + + assert_eq!( + micromark_with_options( + r###"Foo + bar + +"###, + DANGER + ), + r###"

Foo +bar

+"###, + r###"Indented code blocks (112)"### + ); + + assert_eq!( + micromark_with_options( + r###" foo +bar +"###, + DANGER + ), + r###"
foo
+
+

bar

+"###, + r###"Indented code blocks (113)"### + ); + + assert_eq!( + micromark_with_options( + r###"# Heading + foo +Heading +------ + foo +---- +"###, + DANGER + ), + r###"

Heading

+
foo
+
+

Heading

+
foo
+
+
+"###, + r###"Indented code blocks (114)"### + ); + + assert_eq!( + micromark_with_options( + r###" foo + bar +"###, + DANGER + ), + r###"
    foo
+bar
+
+"###, + r###"Indented code blocks (115)"### + ); + + assert_eq!( + micromark_with_options( + r###" + + foo + + +"###, + DANGER + ), + r###"
foo
+
+"###, + r###"Indented code blocks (116)"### + ); + + assert_eq!( + micromark_with_options( + r###" foo +"###, + DANGER + ), + r###"
foo
+
+"###, + r###"Indented code blocks (117)"### + ); + + assert_eq!( + micromark_with_options( + r###"``` +< + > +``` +"###, + DANGER + ), + r###"
<
+ >
+
+"###, + r###"Fenced code blocks (118)"### + ); + + assert_eq!( + micromark_with_options( + r###"~~~ +< + > +~~~ +"###, + DANGER + ), + r###"
<
+ >
+
+"###, + r###"Fenced code blocks (119)"### + ); + + assert_eq!( + micromark_with_options( + r###"`` +foo +`` +"###, + DANGER + ), + r###"

foo

+"###, + r###"Fenced code blocks (120)"### + ); + + assert_eq!( + micromark_with_options( + r###"``` +aaa +~~~ +``` +"###, + DANGER + ), + r###"
aaa
+~~~
+
+"###, + r###"Fenced code blocks (121)"### + ); + + assert_eq!( + micromark_with_options( + r###"~~~ +aaa +``` +~~~ +"###, + DANGER + ), + r###"
aaa
+```
+
+"###, + r###"Fenced code blocks (122)"### + ); + + assert_eq!( + micromark_with_options( + r###"```` +aaa +``` +`````` +"###, + DANGER + ), + r###"
aaa
+```
+
+"###, + r###"Fenced code blocks (123)"### + ); + + assert_eq!( + micromark_with_options( + r###"~~~~ +aaa +~~~ +~~~~ +"###, + DANGER + ), + r###"
aaa
+~~~
+
+"###, + r###"Fenced code blocks (124)"### + ); + + assert_eq!( + micromark_with_options( + r###"``` +"###, + DANGER + ), + r###"
+"###, + r###"Fenced code blocks (125)"### + ); + + assert_eq!( + micromark_with_options( + r###"````` + +``` +aaa +"###, + DANGER + ), + r###"

+```
+aaa
+
+"###, + r###"Fenced code blocks (126)"### + ); + + assert_eq!( + micromark_with_options( + r###"> ``` +> aaa + +bbb +"###, + DANGER + ), + r###"
+
aaa
+
+
+

bbb

+"###, + r###"Fenced code blocks (127)"### + ); + + assert_eq!( + micromark_with_options( + r###"``` + + +``` +"###, + DANGER + ), + r###"

+
+
+"###, + r###"Fenced code blocks (128)"### + ); + + assert_eq!( + micromark_with_options( + r###"``` +``` +"###, + DANGER + ), + r###"
+"###, + r###"Fenced code blocks (129)"### + ); + + assert_eq!( + micromark_with_options( + r###" ``` + aaa +aaa +``` +"###, + DANGER + ), + r###"
aaa
+aaa
+
+"###, + r###"Fenced code blocks (130)"### + ); + + assert_eq!( + micromark_with_options( + r###" ``` +aaa + aaa +aaa + ``` +"###, + DANGER + ), + r###"
aaa
+aaa
+aaa
+
+"###, + r###"Fenced code blocks (131)"### + ); + + assert_eq!( + micromark_with_options( + r###" ``` + aaa + aaa + aaa + ``` +"###, + DANGER + ), + r###"
aaa
+ aaa
+aaa
+
+"###, + r###"Fenced code blocks (132)"### + ); + + assert_eq!( + micromark_with_options( + r###" ``` + aaa + ``` +"###, + DANGER + ), + r###"
```
+aaa
+```
+
+"###, + r###"Fenced code blocks (133)"### + ); + + assert_eq!( + micromark_with_options( + r###"``` +aaa + ``` +"###, + DANGER + ), + r###"
aaa
+
+"###, + r###"Fenced code blocks (134)"### + ); + + assert_eq!( + micromark_with_options( + r###" ``` +aaa + ``` +"###, + DANGER + ), + r###"
aaa
+
+"###, + r###"Fenced code blocks (135)"### + ); + + assert_eq!( + micromark_with_options( + r###"``` +aaa + ``` +"###, + DANGER + ), + r###"
aaa
+    ```
+
+"###, + r###"Fenced code blocks (136)"### + ); + + assert_eq!( + micromark_with_options( + r###"``` ``` +aaa +"###, + DANGER + ), + r###"

+aaa

+"###, + r###"Fenced code blocks (137)"### + ); + + assert_eq!( + micromark_with_options( + r###"~~~~~~ +aaa +~~~ ~~ +"###, + DANGER + ), + r###"
aaa
+~~~ ~~
+
+"###, + r###"Fenced code blocks (138)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo +``` +bar +``` +baz +"###, + DANGER + ), + r###"

foo

+
bar
+
+

baz

+"###, + r###"Fenced code blocks (139)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo +--- +~~~ +bar +~~~ +# baz +"###, + DANGER + ), + r###"

foo

+
bar
+
+

baz

+"###, + r###"Fenced code blocks (140)"### + ); + + assert_eq!( + micromark_with_options( + r###"```ruby +def foo(x) + return 3 +end +``` +"###, + DANGER + ), + r###"
def foo(x)
+  return 3
+end
+
+"###, + r###"Fenced code blocks (141)"### + ); + + assert_eq!( + micromark_with_options( + r###"~~~~ ruby startline=3 $%@#$ +def foo(x) + return 3 +end +~~~~~~~ +"###, + DANGER + ), + r###"
def foo(x)
+  return 3
+end
+
+"###, + r###"Fenced code blocks (142)"### + ); + + assert_eq!( + micromark_with_options( + r###"````; +```` +"###, + DANGER + ), + r###"
+"###, + r###"Fenced code blocks (143)"### + ); + + assert_eq!( + micromark_with_options( + r###"``` aa ``` +foo +"###, + DANGER + ), + r###"

aa +foo

+"###, + r###"Fenced code blocks (144)"### + ); + + assert_eq!( + micromark_with_options( + r###"~~~ aa ``` ~~~ +foo +~~~ +"###, + DANGER + ), + r###"
foo
+
+"###, + r###"Fenced code blocks (145)"### + ); + + assert_eq!( + micromark_with_options( + r###"``` +``` aaa +``` +"###, + DANGER + ), + r###"
``` aaa
+
+"###, + r###"Fenced code blocks (146)"### + ); + + assert_eq!( + micromark_with_options( + r###"
+
+**Hello**,
+
+_world_.
+
+
+"###, + DANGER + ), + r###"
+
+**Hello**,
+

world. +

+
+"###, + r###"HTML blocks (147)"### + ); + + assert_eq!( + micromark_with_options( + r###" + + + +
+ hi +
+ +okay. +"###, + DANGER + ), + r###" + + + +
+ hi +
+

okay.

+"###, + r###"HTML blocks (148)"### + ); + + assert_eq!( + micromark_with_options( + r###"
+ *hello* + +"###, + DANGER + ), + r###"
+ *hello* + +"###, + r###"HTML blocks (149)"### + ); + + assert_eq!( + micromark_with_options( + r###"
+*foo* +"###, + DANGER + ), + r###"
+*foo* +"###, + r###"HTML blocks (150)"### + ); + + assert_eq!( + micromark_with_options( + r###"
+ +*Markdown* + +
+"###, + DANGER + ), + r###"
+

Markdown

+
+"###, + r###"HTML blocks (151)"### + ); + + assert_eq!( + micromark_with_options( + r###"
+
+"###, + DANGER + ), + r###"
+
+"###, + r###"HTML blocks (152)"### + ); + + assert_eq!( + micromark_with_options( + r###"
+
+"###, + DANGER + ), + r###"
+
+"###, + r###"HTML blocks (153)"### + ); + + assert_eq!( + micromark_with_options( + r###"
+*foo* + +*bar* +"###, + DANGER + ), + r###"
+*foo* +

bar

+"###, + r###"HTML blocks (154)"### + ); + + assert_eq!( + micromark_with_options( + r###"
+"###, + DANGER + ), + r###"
*foo*
+"###, + r###"HTML blocks (158)"### + ); + + assert_eq!( + micromark_with_options( + r###"
+foo +
+"###, + DANGER + ), + r###"
+foo +
+"###, + r###"HTML blocks (159)"### + ); + + assert_eq!( + micromark_with_options( + r###"
+``` c +int x = 33; +``` +"###, + DANGER + ), + r###"
+``` c +int x = 33; +``` +"###, + r###"HTML blocks (160)"### + ); + + assert_eq!( + micromark_with_options( + r###" +*bar* + +"###, + DANGER + ), + r###" +*bar* + +"###, + r###"HTML blocks (161)"### + ); + + assert_eq!( + micromark_with_options( + r###" +*bar* + +"###, + DANGER + ), + r###" +*bar* + +"###, + r###"HTML blocks (162)"### + ); + + assert_eq!( + micromark_with_options( + r###" +*bar* + +"###, + DANGER + ), + r###" +*bar* + +"###, + r###"HTML blocks (163)"### + ); + + assert_eq!( + micromark_with_options( + r###" +*bar* +"###, + DANGER + ), + r###" +*bar* +"###, + r###"HTML blocks (164)"### + ); + + assert_eq!( + micromark_with_options( + r###" +*foo* + +"###, + DANGER + ), + r###" +*foo* + +"###, + r###"HTML blocks (165)"### + ); + + assert_eq!( + micromark_with_options( + r###" + +*foo* + + +"###, + DANGER + ), + r###" +

foo

+
+"###, + r###"HTML blocks (166)"### + ); + + assert_eq!( + micromark_with_options( + r###"*foo* +"###, + DANGER + ), + r###"

foo

+"###, + r###"HTML blocks (167)"### + ); + + assert_eq!( + micromark_with_options( + r###"

+import Text.HTML.TagSoup
+
+main :: IO ()
+main = print $ parseTags tags
+
+okay +"###, + DANGER + ), + r###"

+import Text.HTML.TagSoup
+
+main :: IO ()
+main = print $ parseTags tags
+
+

okay

+"###, + r###"HTML blocks (168)"### + ); + + assert_eq!( + micromark_with_options( + r###" +okay +"###, + DANGER + ), + r###" +

okay

+"###, + r###"HTML blocks (169)"### + ); + + assert_eq!( + micromark_with_options( + r###" +"###, + DANGER + ), + r###" +"###, + r###"HTML blocks (170)"### + ); + + assert_eq!( + micromark_with_options( + r###" +okay +"###, + DANGER + ), + r###" +

okay

+"###, + r###"HTML blocks (171)"### + ); + + assert_eq!( + micromark_with_options( + r###" +*foo* +"###, + DANGER + ), + r###" +

foo

+"###, + r###"HTML blocks (175)"### + ); + + assert_eq!( + micromark_with_options( + r###"*bar* +*baz* +"###, + DANGER + ), + r###"*bar* +

baz

+"###, + r###"HTML blocks (176)"### + ); + + assert_eq!( + micromark_with_options( + r###"1. *bar* +"###, + DANGER + ), + r###"1. *bar* +"###, + r###"HTML blocks (177)"### + ); + + assert_eq!( + micromark_with_options( + r###" +okay +"###, + DANGER + ), + r###" +

okay

+"###, + r###"HTML blocks (178)"### + ); + + assert_eq!( + micromark_with_options( + r###"'; + +?> +okay +"###, + DANGER + ), + r###"'; + +?> +

okay

+"###, + r###"HTML blocks (179)"### + ); + + assert_eq!( + micromark_with_options( + r###" +"###, + DANGER + ), + r###" +"###, + r###"HTML blocks (180)"### + ); + + assert_eq!( + micromark_with_options( + r###" +okay +"###, + DANGER + ), + r###" +

okay

+"###, + r###"HTML blocks (181)"### + ); + + assert_eq!( + micromark_with_options( + r###" + + +"###, + DANGER + ), + r###" +
<!-- foo -->
+
+"###, + r###"HTML blocks (182)"### + ); + + assert_eq!( + micromark_with_options( + r###"
+ +
+"###, + DANGER + ), + r###"
+
<div>
+
+"###, + r###"HTML blocks (183)"### + ); + + assert_eq!( + micromark_with_options( + r###"Foo +
+bar +
+"###, + DANGER + ), + r###"

Foo

+
+bar +
+"###, + r###"HTML blocks (184)"### + ); + + assert_eq!( + micromark_with_options( + r###"
+bar +
+*foo* +"###, + DANGER + ), + r###"
+bar +
+*foo* +"###, + r###"HTML blocks (185)"### + ); + + assert_eq!( + micromark_with_options( + r###"Foo + +baz +"###, + DANGER + ), + r###"

Foo + +baz

+"###, + r###"HTML blocks (186)"### + ); + + assert_eq!( + micromark_with_options( + r###"
+ +*Emphasized* text. + +
+"###, + DANGER + ), + r###"
+

Emphasized text.

+
+"###, + r###"HTML blocks (187)"### + ); + + assert_eq!( + micromark_with_options( + r###"
+*Emphasized* text. +
+"###, + DANGER + ), + r###"
+*Emphasized* text. +
+"###, + r###"HTML blocks (188)"### + ); + + assert_eq!( + micromark_with_options( + r###" + + + + + + + +
+Hi +
+"###, + DANGER + ), + r###" + + + +
+Hi +
+"###, + r###"HTML blocks (189)"### + ); + + assert_eq!( + micromark_with_options( + r###" + + + + + + + +
+ Hi +
+"###, + DANGER + ), + r###" + +
<td>
+  Hi
+</td>
+
+ +
+"###, + r###"HTML blocks (190)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo]: /url "title" + +[foo] +"###, + DANGER + ), + r###"

foo

+"###, + r###"Link reference definitions (191)"### + ); + + assert_eq!( + micromark_with_options( + r###" [foo]: + /url + 'the title' + +[foo] +"###, + DANGER + ), + r###"

foo

+"###, + r###"Link reference definitions (192)"### + ); + + assert_eq!( + micromark_with_options( + r###"[Foo*bar\]]:my_(url) 'title (with parens)' + +[Foo*bar\]] +"###, + DANGER + ), + r###"

Foo*bar]

+"###, + r###"Link reference definitions (193)"### + ); + + assert_eq!( + micromark_with_options( + r###"[Foo bar]: + +'title' + +[Foo bar] +"###, + DANGER + ), + r###"

Foo bar

+"###, + r###"Link reference definitions (194)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo]: /url ' +title +line1 +line2 +' + +[foo] +"###, + DANGER + ), + r###"

foo

+"###, + r###"Link reference definitions (195)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo]: /url 'title + +with blank line' + +[foo] +"###, + DANGER + ), + r###"

[foo]: /url 'title

+

with blank line'

+

[foo]

+"###, + r###"Link reference definitions (196)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo]: +/url + +[foo] +"###, + DANGER + ), + r###"

foo

+"###, + r###"Link reference definitions (197)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo]: + +[foo] +"###, + DANGER + ), + r###"

[foo]:

+

[foo]

+"###, + r###"Link reference definitions (198)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo]: <> + +[foo] +"###, + DANGER + ), + r###"

foo

+"###, + r###"Link reference definitions (199)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo]: (baz) + +[foo] +"###, + DANGER + ), + r###"

[foo]: (baz)

+

[foo]

+"###, + r###"Link reference definitions (200)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo]: /url\bar\*baz "foo\"bar\baz" + +[foo] +"###, + DANGER + ), + r###"

foo

+"###, + r###"Link reference definitions (201)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo] + +[foo]: url +"###, + DANGER + ), + r###"

foo

+"###, + r###"Link reference definitions (202)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo] + +[foo]: first +[foo]: second +"###, + DANGER + ), + r###"

foo

+"###, + r###"Link reference definitions (203)"### + ); + + assert_eq!( + micromark_with_options( + r###"[FOO]: /url + +[Foo] +"###, + DANGER + ), + r###"

Foo

+"###, + r###"Link reference definitions (204)"### + ); + + assert_eq!( + micromark_with_options( + r###"[ΑΓΩ]: /φου + +[αγω] +"###, + DANGER + ), + r###"

αγω

+"###, + r###"Link reference definitions (205)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo]: /url +"###, + DANGER + ), + r###""###, + r###"Link reference definitions (206)"### + ); + + assert_eq!( + micromark_with_options( + r###"[ +foo +]: /url +bar +"###, + DANGER + ), + r###"

bar

+"###, + r###"Link reference definitions (207)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo]: /url "title" ok +"###, + DANGER + ), + r###"

[foo]: /url "title" ok

+"###, + r###"Link reference definitions (208)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo]: /url +"title" ok +"###, + DANGER + ), + r###"

"title" ok

+"###, + r###"Link reference definitions (209)"### + ); + + assert_eq!( + micromark_with_options( + r###" [foo]: /url "title" + +[foo] +"###, + DANGER + ), + r###"
[foo]: /url "title"
+
+

[foo]

+"###, + r###"Link reference definitions (210)"### + ); + + assert_eq!( + micromark_with_options( + r###"``` +[foo]: /url +``` + +[foo] +"###, + DANGER + ), + r###"
[foo]: /url
+
+

[foo]

+"###, + r###"Link reference definitions (211)"### + ); + + assert_eq!( + micromark_with_options( + r###"Foo +[bar]: /baz + +[bar] +"###, + DANGER + ), + r###"

Foo +[bar]: /baz

+

[bar]

+"###, + r###"Link reference definitions (212)"### + ); + + assert_eq!( + micromark_with_options( + r###"# [Foo] +[foo]: /url +> bar +"###, + DANGER + ), + r###"

Foo

+
+

bar

+
+"###, + r###"Link reference definitions (213)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo]: /url +bar +=== +[foo] +"###, + DANGER + ), + r###"

bar

+

foo

+"###, + r###"Link reference definitions (214)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo]: /url +=== +[foo] +"###, + DANGER + ), + r###"

=== +foo

+"###, + r###"Link reference definitions (215)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo]: /foo-url "foo" +[bar]: /bar-url + "bar" +[baz]: /baz-url + +[foo], +[bar], +[baz] +"###, + DANGER + ), + r###"

foo, +bar, +baz

+"###, + r###"Link reference definitions (216)"### + ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options(r###"[foo] + + // > [foo]: /url + // "###, DANGER), + // r###"

foo

+ //
+ //
+ // "###, + // r###"Link reference definitions (217)"### + // ); + + assert_eq!( + micromark_with_options( + r###"aaa + +bbb +"###, + DANGER + ), + r###"

aaa

+

bbb

+"###, + r###"Paragraphs (218)"### + ); + + assert_eq!( + micromark_with_options( + r###"aaa +bbb + +ccc +ddd +"###, + DANGER + ), + r###"

aaa +bbb

+

ccc +ddd

+"###, + r###"Paragraphs (219)"### + ); + + assert_eq!( + micromark_with_options( + r###"aaa + + +bbb +"###, + DANGER + ), + r###"

aaa

+

bbb

+"###, + r###"Paragraphs (220)"### + ); + + assert_eq!( + micromark_with_options( + r###" aaa + bbb +"###, + DANGER + ), + r###"

aaa +bbb

+"###, + r###"Paragraphs (221)"### + ); + + assert_eq!( + micromark_with_options( + r###"aaa + bbb + ccc +"###, + DANGER + ), + r###"

aaa +bbb +ccc

+"###, + r###"Paragraphs (222)"### + ); + + assert_eq!( + micromark_with_options( + r###" aaa +bbb +"###, + DANGER + ), + r###"

aaa +bbb

+"###, + r###"Paragraphs (223)"### + ); + + assert_eq!( + micromark_with_options( + r###" aaa +bbb +"###, + DANGER + ), + r###"
aaa
+
+

bbb

+"###, + r###"Paragraphs (224)"### + ); + + // To do: whitespace trimming of editor likely? + // assert_eq!( + // micromark_with_options(r###"aaa + // bbb + // "###, DANGER), + // r###"

aaa
+ // bbb

+ // "###, + // r###"Paragraphs (225)"### + // ); + + assert_eq!( + micromark_with_options( + r###" + +aaa + + +# aaa + + +"###, + DANGER + ), + r###"

aaa

+

aaa

+"###, + r###"Blank lines (226)"### + ); + + assert_eq!( + micromark_with_options( + r###"> # Foo +> bar +> baz +"###, + DANGER + ), + r###"
+

Foo

+

bar +baz

+
+"###, + r###"Block quotes (227)"### + ); + + assert_eq!( + micromark_with_options( + r###"># Foo +>bar +> baz +"###, + DANGER + ), + r###"
+

Foo

+

bar +baz

+
+"###, + r###"Block quotes (228)"### + ); + + assert_eq!( + micromark_with_options( + r###" > # Foo + > bar + > baz +"###, + DANGER + ), + r###"
+

Foo

+

bar +baz

+
+"###, + r###"Block quotes (229)"### + ); + + assert_eq!( + micromark_with_options( + r###" > # Foo + > bar + > baz +"###, + DANGER + ), + r###"
> # Foo
+> bar
+> baz
+
+"###, + r###"Block quotes (230)"### + ); + + // To do: whitespace trimming of editor likely? + // assert_eq!( + // micromark_with_options(r###"> # Foo + // > bar + // baz + // "###, DANGER), + // r###"
+ //

Foo

+ //

bar + // baz

+ //
+ // "###, + // r###"Block quotes (231)"### + // ); + + assert_eq!( + micromark_with_options( + r###"> bar +baz +> foo +"###, + DANGER + ), + r###"
+

bar +baz +foo

+
+"###, + r###"Block quotes (232)"### + ); + + assert_eq!( + micromark_with_options( + r###"> foo +--- +"###, + DANGER + ), + r###"
+

foo

+
+
+"###, + r###"Block quotes (233)"### + ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options(r###"> - foo + // - bar + // "###, DANGER), + // r###"
+ //
    + //
  • foo
  • + //
+ //
+ //
    + //
  • bar
  • + //
+ // "###, + // r###"Block quotes (234)"### + // ); + + assert_eq!( + micromark_with_options( + r###"> foo + bar +"###, + DANGER + ), + r###"
+
foo
+
+
+
bar
+
+"###, + r###"Block quotes (235)"### + ); + + assert_eq!( + micromark_with_options( + r###"> ``` +foo +``` +"###, + DANGER + ), + r###"
+
+
+

foo

+
+"###, + r###"Block quotes (236)"### + ); + + // To do: some bug with laziness. + // assert_eq!( + // micromark_with_options(r###"> foo + // - bar + // "###, DANGER), + // r###"
+ //

foo + // - bar

+ //
+ // "###, + // r###"Block quotes (237)"### + // ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options(r###"> + // "###, DANGER), + // r###"
+ //
+ // "###, + // r###"Block quotes (238)"### + // ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options(r###"> + // > + // > + // "###, DANGER), + // r###"
+ //
+ // "###, + // r###"Block quotes (239)"### + // ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options(r###"> + // > foo + // > + // "###, DANGER), + // r###"
+ //

foo

+ //
+ // "###, + // r###"Block quotes (240)"### + // ); + + assert_eq!( + micromark_with_options( + r###"> foo + +> bar +"###, + DANGER + ), + r###"
+

foo

+
+
+

bar

+
+"###, + r###"Block quotes (241)"### + ); + + assert_eq!( + micromark_with_options( + r###"> foo +> bar +"###, + DANGER + ), + r###"
+

foo +bar

+
+"###, + r###"Block quotes (242)"### + ); + + assert_eq!( + micromark_with_options( + r###"> foo +> +> bar +"###, + DANGER + ), + r###"
+

foo

+

bar

+
+"###, + r###"Block quotes (243)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo +> bar +"###, + DANGER + ), + r###"

foo

+
+

bar

+
+"###, + r###"Block quotes (244)"### + ); + + assert_eq!( + micromark_with_options( + r###"> aaa +*** +> bbb +"###, + DANGER + ), + r###"
+

aaa

+
+
+
+

bbb

+
+"###, + r###"Block quotes (245)"### + ); + + // To do: some bug with laziness. + // assert_eq!( + // micromark_with_options(r###"> bar + // baz + // "###, DANGER), + // r###"
+ //

bar + // baz

+ //
+ // "###, + // r###"Block quotes (246)"### + // ); + + assert_eq!( + micromark_with_options( + r###"> bar + +baz +"###, + DANGER + ), + r###"
+

bar

+
+

baz

+"###, + r###"Block quotes (247)"### + ); + + assert_eq!( + micromark_with_options( + r###"> bar +> +baz +"###, + DANGER + ), + r###"
+

bar

+
+

baz

+"###, + r###"Block quotes (248)"### + ); + + // To do: some bug with laziness. + // assert_eq!( + // micromark_with_options(r###"> > > foo + // bar + // "###, DANGER), + // r###"
+ //
+ //
+ //

foo + // bar

+ //
+ //
+ //
+ // "###, + // r###"Block quotes (249)"### + // ); + + // To do: some bug with laziness. + // assert_eq!( + // micromark_with_options(r###">>> foo + // > bar + // >>baz + // "###, DANGER), + // r###"
+ //
+ //
+ //

foo + // bar + // baz

+ //
+ //
+ //
+ // "###, + // r###"Block quotes (250)"### + // ); + + assert_eq!( + micromark_with_options( + r###"> code + +> not code +"###, + DANGER + ), + r###"
+
code
+
+
+
+

not code

+
+"###, + r###"Block quotes (251)"### + ); + + assert_eq!( + micromark_with_options( + r###"A paragraph +with two lines. + + indented code + +> A block quote. +"###, + DANGER + ), + r###"

A paragraph +with two lines.

+
indented code
+
+
+

A block quote.

+
+"###, + r###"List items (252)"### + ); + + assert_eq!( + micromark_with_options( + r###"1. A paragraph + with two lines. + + indented code + + > A block quote. +"###, + DANGER + ), + r###"
    +
  1. +

    A paragraph +with two lines.

    +
    indented code
    +
    +
    +

    A block quote.

    +
    +
  2. +
+"###, + r###"List items (253)"### + ); + + assert_eq!( + micromark_with_options( + r###"- one + + two +"###, + DANGER + ), + r###"
    +
  • one
  • +
+

two

+"###, + r###"List items (254)"### + ); + + assert_eq!( + micromark_with_options( + r###"- one + + two +"###, + DANGER + ), + r###"
    +
  • +

    one

    +

    two

    +
  • +
+"###, + r###"List items (255)"### + ); + + assert_eq!( + micromark_with_options( + r###" - one + + two +"###, + DANGER + ), + r###"
    +
  • one
  • +
+
 two
+
+"###, + r###"List items (256)"### + ); + + assert_eq!( + micromark_with_options( + r###" - one + + two +"###, + DANGER + ), + r###"
    +
  • +

    one

    +

    two

    +
  • +
+"###, + r###"List items (257)"### + ); + + assert_eq!( + micromark_with_options( + r###" > > 1. one +>> +>> two +"###, + DANGER + ), + r###"
+
+
    +
  1. +

    one

    +

    two

    +
  2. +
+
+
+"###, + r###"List items (258)"### + ); + + assert_eq!( + micromark_with_options( + r###">>- one +>> + > > two +"###, + DANGER + ), + r###"
+
+
    +
  • one
  • +
+

two

+
+
+"###, + r###"List items (259)"### + ); + + assert_eq!( + micromark_with_options( + r###"-one + +2.two +"###, + DANGER + ), + r###"

-one

+

2.two

+"###, + r###"List items (260)"### + ); + + assert_eq!( + micromark_with_options( + r###"- foo + + + bar +"###, + DANGER + ), + r###"
    +
  • +

    foo

    +

    bar

    +
  • +
+"###, + r###"List items (261)"### + ); + + assert_eq!( + micromark_with_options( + r###"1. foo + + ``` + bar + ``` + + baz + + > bam +"###, + DANGER + ), + r###"
    +
  1. +

    foo

    +
    bar
    +
    +

    baz

    +
    +

    bam

    +
    +
  2. +
+"###, + r###"List items (262)"### + ); + + assert_eq!( + micromark_with_options( + r###"- Foo + + bar + + + baz +"###, + DANGER + ), + r###"
    +
  • +

    Foo

    +
    bar
    +
    +
    +baz
    +
    +
  • +
+"###, + r###"List items (263)"### + ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options(r###"123456789. ok + // "###, DANGER), + // r###"
    + //
  1. ok
  2. + //
+ // "###, + // r###"List items (264)"### + // ); + + assert_eq!( + micromark_with_options( + r###"1234567890. not ok +"###, + DANGER + ), + r###"

1234567890. not ok

+"###, + r###"List items (265)"### + ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options(r###"0. ok + // "###, DANGER), + // r###"
    + //
  1. ok
  2. + //
+ // "###, + // r###"List items (266)"### + // ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options(r###"003. ok + // "###, DANGER), + // r###"
    + //
  1. ok
  2. + //
+ // "###, + // r###"List items (267)"### + // ); + + assert_eq!( + micromark_with_options( + r###"-1. not ok +"###, + DANGER + ), + r###"

-1. not ok

+"###, + r###"List items (268)"### + ); + + assert_eq!( + micromark_with_options( + r###"- foo + + bar +"###, + DANGER + ), + r###"
    +
  • +

    foo

    +
    bar
    +
    +
  • +
+"###, + r###"List items (269)"### + ); + + assert_eq!( + micromark_with_options( + r###" 10. foo + + bar +"###, + DANGER + ), + r###"
    +
  1. +

    foo

    +
    bar
    +
    +
  2. +
+"###, + r###"List items (270)"### + ); + + assert_eq!( + micromark_with_options( + r###" indented code + +paragraph + + more code +"###, + DANGER + ), + r###"
indented code
+
+

paragraph

+
more code
+
+"###, + r###"List items (271)"### + ); + + assert_eq!( + micromark_with_options( + r###"1. indented code + + paragraph + + more code +"###, + DANGER + ), + r###"
    +
  1. +
    indented code
    +
    +

    paragraph

    +
    more code
    +
    +
  2. +
+"###, + r###"List items (272)"### + ); + + assert_eq!( + micromark_with_options( + r###"1. indented code + + paragraph + + more code +"###, + DANGER + ), + r###"
    +
  1. +
     indented code
    +
    +

    paragraph

    +
    more code
    +
    +
  2. +
+"###, + r###"List items (273)"### + ); + + assert_eq!( + micromark_with_options( + r###" foo + +bar +"###, + DANGER + ), + r###"

foo

+

bar

+"###, + r###"List items (274)"### + ); + + assert_eq!( + micromark_with_options( + r###"- foo + + bar +"###, + DANGER + ), + r###"
    +
  • foo
  • +
+

bar

+"###, + r###"List items (275)"### + ); + + assert_eq!( + micromark_with_options( + r###"- foo + + bar +"###, + DANGER + ), + r###"
    +
  • +

    foo

    +

    bar

    +
  • +
+"###, + r###"List items (276)"### + ); + + assert_eq!( + micromark_with_options( + r###"- + foo +- + ``` + bar + ``` +- + baz +"###, + DANGER + ), + r###"
    +
  • foo
  • +
  • +
    bar
    +
    +
  • +
  • +
    baz
    +
    +
  • +
+"###, + r###"List items (277)"### + ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options(r###"- + // foo + // "###, DANGER), + // r###"
    + //
  • foo
  • + //
+ // "###, + // r###"List items (278)"### + // ); + + assert_eq!( + micromark_with_options( + r###"- + + foo +"###, + DANGER + ), + r###"
    +
  • +
+

foo

+"###, + r###"List items (279)"### + ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options( + // r###"- foo + // - + // - bar + // "###, + // DANGER + // ), + // r###"
    + //
  • foo
  • + //
  • + //
  • bar
  • + //
+ // "###, + // r###"List items (280)"### + // ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options( + // r###"- foo + // - + // - bar + // "###, + // DANGER + // ), + // r###"
    + //
  • foo
  • + //
  • + //
  • bar
  • + //
+ // "###, + // r###"List items (281)"### + // ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options( + // r###"1. foo + // 2. + // 3. bar + // "###, + // DANGER + // ), + // r###"
    + //
  1. foo
  2. + //
  3. + //
  4. bar
  5. + //
+ // "###, + // r###"List items (282)"### + // ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options( + // r###"* + // "###, + // DANGER + // ), + // r###"
    + //
  • + //
+ // "###, + // r###"List items (283)"### + // ); + + assert_eq!( + micromark_with_options( + r###"foo +* + +foo +1. +"###, + DANGER + ), + r###"

foo +*

+

foo +1.

+"###, + r###"List items (284)"### + ); + + assert_eq!( + micromark_with_options( + r###" 1. A paragraph + with two lines. + + indented code + + > A block quote. +"###, + DANGER + ), + r###"
    +
  1. +

    A paragraph +with two lines.

    +
    indented code
    +
    +
    +

    A block quote.

    +
    +
  2. +
+"###, + r###"List items (285)"### + ); + + assert_eq!( + micromark_with_options( + r###" 1. A paragraph + with two lines. + + indented code + + > A block quote. +"###, + DANGER + ), + r###"
    +
  1. +

    A paragraph +with two lines.

    +
    indented code
    +
    +
    +

    A block quote.

    +
    +
  2. +
+"###, + r###"List items (286)"### + ); + + assert_eq!( + micromark_with_options( + r###" 1. A paragraph + with two lines. + + indented code + + > A block quote. +"###, + DANGER + ), + r###"
    +
  1. +

    A paragraph +with two lines.

    +
    indented code
    +
    +
    +

    A block quote.

    +
    +
  2. +
+"###, + r###"List items (287)"### + ); + + assert_eq!( + micromark_with_options( + r###" 1. A paragraph + with two lines. + + indented code + + > A block quote. +"###, + DANGER + ), + r###"
1.  A paragraph
+    with two lines.
+
+        indented code
+
+    > A block quote.
+
+"###, + r###"List items (288)"### + ); + + assert_eq!( + micromark_with_options( + r###" 1. A paragraph +with two lines. + + indented code + + > A block quote. +"###, + DANGER + ), + r###"
    +
  1. +

    A paragraph +with two lines.

    +
    indented code
    +
    +
    +

    A block quote.

    +
    +
  2. +
+"###, + r###"List items (289)"### + ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options( + // r###" 1. A paragraph + // with two lines. + // "###, + // DANGER + // ), + // r###"
    + //
  1. A paragraph + // with two lines.
  2. + //
+ // "###, + // r###"List items (290)"### + // ); + + // To do: some bug with laziness. + // assert_eq!( + // micromark_with_options( + // r###"> 1. > Blockquote + // continued here. + // "###, + // DANGER + // ), + // r###"
+ //
    + //
  1. + //
    + //

    Blockquote + // continued here.

    + //
    + //
  2. + //
+ //
+ // "###, + // r###"List items (291)"### + // ); + + // To do: some bug with laziness. + // assert_eq!( + // micromark_with_options( + // r###"> 1. > Blockquote + // > continued here. + // "###, + // DANGER + // ), + // r###"
+ //
    + //
  1. + //
    + //

    Blockquote + // continued here.

    + //
    + //
  2. + //
+ //
+ // "###, + // r###"List items (292)"### + // ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options( + // r###"- foo + // - bar + // - baz + // - boo + // "###, + // DANGER + // ), + // r###"
    + //
  • foo + //
      + //
    • bar + //
        + //
      • baz + //
          + //
        • boo
        • + //
        + //
      • + //
      + //
    • + //
    + //
  • + //
+ // "###, + // r###"List items (293)"### + // ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options( + // r###"- foo + // - bar + // - baz + // - boo + // "###, + // DANGER + // ), + // r###"
    + //
  • foo
  • + //
  • bar
  • + //
  • baz
  • + //
  • boo
  • + //
+ // "###, + // r###"List items (294)"### + // ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options( + // r###"10) foo + // - bar + // "###, + // DANGER + // ), + // r###"
    + //
  1. foo + //
      + //
    • bar
    • + //
    + //
  2. + //
+ // "###, + // r###"List items (295)"### + // ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options( + // r###"10) foo + // - bar + // "###, + // DANGER + // ), + // r###"
    + //
  1. foo
  2. + //
+ //
    + //
  • bar
  • + //
+ // "###, + // r###"List items (296)"### + // ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options( + // r###"- - foo + // "###, + // DANGER + // ), + // r###"
    + //
  • + //
      + //
    • foo
    • + //
    + //
  • + //
+ // "###, + // r###"List items (297)"### + // ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options( + // r###"1. - 2. foo + // "###, + // DANGER + // ), + // r###"
    + //
  1. + //
      + //
    • + //
        + //
      1. foo
      2. + //
      + //
    • + //
    + //
  2. + //
+ // "###, + // r###"List items (298)"### + // ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options( + // r###"- # Foo + // - Bar + // --- + // baz + // "###, + // DANGER + // ), + // r###"
    + //
  • + //

    Foo

    + //
  • + //
  • + //

    Bar

    + // baz
  • + //
+ // "###, + // r###"List items (299)"### + // ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options( + // r###"- foo + // - bar + // + baz + // "###, + // DANGER + // ), + // r###"
    + //
  • foo
  • + //
  • bar
  • + //
+ //
    + //
  • baz
  • + //
+ // "###, + // r###"Lists (300)"### + // ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options( + // r###"1. foo + // 2. bar + // 3) baz + // "###, + // DANGER + // ), + // r###"
    + //
  1. foo
  2. + //
  3. bar
  4. + //
+ //
    + //
  1. baz
  2. + //
+ // "###, + // r###"Lists (301)"### + // ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options( + // r###"Foo + // - bar + // - baz + // "###, + // DANGER + // ), + // r###"

Foo

+ //
    + //
  • bar
  • + //
  • baz
  • + //
+ // "###, + // r###"Lists (302)"### + // ); + + // To do: some bug with interrupting. + // assert_eq!( + // micromark_with_options( + // r###"The number of windows in my house is + // 14. The number of doors is 6. + // "###, + // DANGER + // ), + // r###"

The number of windows in my house is + // 14. The number of doors is 6.

+ // "###, + // r###"Lists (303)"### + // ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options( + // r###"The number of windows in my house is + // 1. The number of doors is 6. + // "###, + // DANGER + // ), + // r###"

The number of windows in my house is

+ //
    + //
  1. The number of doors is 6.
  2. + //
+ // "###, + // r###"Lists (304)"### + // ); + + assert_eq!( + micromark_with_options( + r###"- foo + +- bar + + +- baz +"###, + DANGER + ), + r###"
    +
  • +

    foo

    +
  • +
  • +

    bar

    +
  • +
  • +

    baz

    +
  • +
+"###, + r###"Lists (305)"### + ); + + assert_eq!( + micromark_with_options( + r###"- foo + - bar + - baz + + + bim +"###, + DANGER + ), + r###"
    +
  • foo +
      +
    • bar +
        +
      • +

        baz

        +

        bim

        +
      • +
      +
    • +
    +
  • +
+"###, + r###"Lists (306)"### + ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options( + // r###"- foo + // - bar + + // + + // - baz + // - bim + // "###, + // DANGER + // ), + // r###"
    + //
  • foo
  • + //
  • bar
  • + //
+ // + //
    + //
  • baz
  • + //
  • bim
  • + //
+ // "###, + // r###"Lists (307)"### + // ); + + assert_eq!( + micromark_with_options( + r###"- foo + + notcode + +- foo + + + + code +"###, + DANGER + ), + r###"
    +
  • +

    foo

    +

    notcode

    +
  • +
  • +

    foo

    +
  • +
+ +
code
+
+"###, + r###"Lists (308)"### + ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options( + // r###"- a + // - b + // - c + // - d + // - e + // - f + // - g + // "###, + // DANGER + // ), + // r###"
    + //
  • a
  • + //
  • b
  • + //
  • c
  • + //
  • d
  • + //
  • e
  • + //
  • f
  • + //
  • g
  • + //
+ // "###, + // r###"Lists (309)"### + // ); + + assert_eq!( + micromark_with_options( + r###"1. a + + 2. b + + 3. c +"###, + DANGER + ), + r###"
    +
  1. +

    a

    +
  2. +
  3. +

    b

    +
  4. +
  5. +

    c

    +
  6. +
+"###, + r###"Lists (310)"### + ); + + // To do: some bug with interrupting. + // assert_eq!( + // micromark_with_options( + // r###"- a + // - b + // - c + // - d + // - e + // "###, + // DANGER + // ), + // r###"
    + //
  • a
  • + //
  • b
  • + //
  • c
  • + //
  • d + // - e
  • + //
+ // "###, + // r###"Lists (311)"### + // ); + + assert_eq!( + micromark_with_options( + r###"1. a + + 2. b + + 3. c +"###, + DANGER + ), + r###"
    +
  1. +

    a

    +
  2. +
  3. +

    b

    +
  4. +
+
3. c
+
+"###, + r###"Lists (312)"### + ); + + assert_eq!( + micromark_with_options( + r###"- a +- b + +- c +"###, + DANGER + ), + r###"
    +
  • +

    a

    +
  • +
  • +

    b

    +
  • +
  • +

    c

    +
  • +
+"###, + r###"Lists (313)"### + ); + + assert_eq!( + micromark_with_options( + r###"* a +* + +* c +"###, + DANGER + ), + r###"
    +
  • +

    a

    +
  • +
  • +
  • +

    c

    +
  • +
+"###, + r###"Lists (314)"### + ); + + assert_eq!( + micromark_with_options( + r###"- a +- b + + c +- d +"###, + DANGER + ), + r###"
    +
  • +

    a

    +
  • +
  • +

    b

    +

    c

    +
  • +
  • +

    d

    +
  • +
+"###, + r###"Lists (315)"### + ); + + assert_eq!( + micromark_with_options( + r###"- a +- b + + [ref]: /url +- d +"###, + DANGER + ), + r###"
    +
  • +

    a

    +
  • +
  • +

    b

    +
  • +
  • +

    d

    +
  • +
+"###, + r###"Lists (316)"### + ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options( + // r###"- a + // - ``` + // b + + // ``` + // - c + // "###, + // DANGER + // ), + // r###"
    + //
  • a
  • + //
  • + //
    b
    +
    +    // 
    + //
  • + //
  • c
  • + //
+ // "###, + // r###"Lists (317)"### + // ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options( + // r###"- a + // - b + + // c + // - d + // "###, + // DANGER + // ), + // r###"
    + //
  • a + //
      + //
    • + //

      b

      + //

      c

      + //
    • + //
    + //
  • + //
  • d
  • + //
+ // "###, + // r###"Lists (318)"### + // ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options( + // r###"* a + // > b + // > + // * c + // "###, + // DANGER + // ), + // r###"
    + //
  • a + //
    + //

    b

    + //
    + //
  • + //
  • c
  • + //
+ // "###, + // r###"Lists (319)"### + // ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options( + // r###"- a + // > b + // ``` + // c + // ``` + // - d + // "###, + // DANGER + // ), + // r###"
    + //
  • a + //
    + //

    b

    + //
    + //
    c
    +    // 
    + //
  • + //
  • d
  • + //
+ // "###, + // r###"Lists (320)"### + // ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options( + // r###"- a + // "###, + // DANGER + // ), + // r###"
    + //
  • a
  • + //
+ // "###, + // r###"Lists (321)"### + // ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options( + // r###"- a + // - b + // "###, + // DANGER + // ), + // r###"
    + //
  • a + //
      + //
    • b
    • + //
    + //
  • + //
+ // "###, + // r###"Lists (322)"### + // ); + + assert_eq!( + micromark_with_options( + r###"1. ``` + foo + ``` + + bar +"###, + DANGER + ), + r###"
    +
  1. +
    foo
    +
    +

    bar

    +
  2. +
+"###, + r###"Lists (323)"### + ); + + assert_eq!( + micromark_with_options( + r###"* foo + * bar + + baz +"###, + DANGER + ), + r###"
    +
  • +

    foo

    +
      +
    • bar
    • +
    +

    baz

    +
  • +
+"###, + r###"Lists (324)"### + ); + + // To do: eol after containers. + // assert_eq!( + // micromark_with_options( + // r###"- a + // - b + // - c + + // - d + // - e + // - f + // "###, + // DANGER + // ), + // r###"
    + //
  • + //

    a

    + //
      + //
    • b
    • + //
    • c
    • + //
    + //
  • + //
  • + //

    d

    + //
      + //
    • e
    • + //
    • f
    • + //
    + //
  • + //
+ // "###, + // r###"Lists (325)"### + // ); + + assert_eq!( + micromark_with_options( + r###"`hi`lo` +"###, + DANGER + ), + r###"

hilo`

+"###, + r###"Inlines (326)"### + ); + + assert_eq!( + micromark_with_options( + r###"`foo` +"###, + DANGER + ), + r###"

foo

+"###, + r###"Code spans (327)"### + ); + + assert_eq!( + micromark_with_options( + r###"`` foo ` bar `` +"###, + DANGER + ), + r###"

foo ` bar

+"###, + r###"Code spans (328)"### + ); + + assert_eq!( + micromark_with_options( + r###"` `` ` +"###, + DANGER + ), + r###"

``

+"###, + r###"Code spans (329)"### + ); + + assert_eq!( + micromark_with_options( + r###"` `` ` +"###, + DANGER + ), + r###"

``

+"###, + r###"Code spans (330)"### + ); + + assert_eq!( + micromark_with_options( + r###"` a` +"###, + DANGER + ), + r###"

a

+"###, + r###"Code spans (331)"### + ); + + assert_eq!( + micromark_with_options( + r###"` b ` +"###, + DANGER + ), + r###"

 b 

+"###, + r###"Code spans (332)"### + ); + + assert_eq!( + micromark_with_options( + r###"` ` +` ` +"###, + DANGER + ), + r###"

  +

+"###, + r###"Code spans (333)"### + ); + + // To do: some bug with generating tests. + // assert_eq!( + // micromark_with_options( + // r###"`` + // foo + // bar + // baz + // `` + // "###, + // DANGER + // ), + // r###"

foo bar baz

+ // "###, + // r###"Code spans (334)"### + // ); + + // To do: bug with a line ending sticking around? Generating this file? + // assert_eq!( + // micromark_with_options( + // r###"`` + // foo + // `` + // "###, + // DANGER + // ), + // r###"

foo

+ // "###, + // r###"Code spans (335)"### + // ); + + // To do: bug generating this file? + // assert_eq!( + // micromark_with_options( + // r###"`foo bar + // baz` + // "###, + // DANGER + // ), + // r###"

foo bar baz

+ // "###, + // r###"Code spans (336)"### + // ); + + assert_eq!( + micromark_with_options( + r###"`foo\`bar` +"###, + DANGER + ), + r###"

foo\bar`

+"###, + r###"Code spans (337)"### + ); + + assert_eq!( + micromark_with_options( + r###"``foo`bar`` +"###, + DANGER + ), + r###"

foo`bar

+"###, + r###"Code spans (338)"### + ); + + assert_eq!( + micromark_with_options( + r###"` foo `` bar ` +"###, + DANGER + ), + r###"

foo `` bar

+"###, + r###"Code spans (339)"### + ); + + assert_eq!( + micromark_with_options( + r###"*foo`*` +"###, + DANGER + ), + r###"

*foo*

+"###, + r###"Code spans (340)"### + ); + + assert_eq!( + micromark_with_options( + r###"[not a `link](/foo`) +"###, + DANGER + ), + r###"

[not a link](/foo)

+"###, + r###"Code spans (341)"### + ); + + assert_eq!( + micromark_with_options( + r###"`` +"###, + DANGER + ), + r###"

<a href="">`

+"###, + r###"Code spans (342)"### + ); + + assert_eq!( + micromark_with_options( + r###"
` +"###, + DANGER + ), + r###"

`

+"###, + r###"Code spans (343)"### + ); + + assert_eq!( + micromark_with_options( + r###"`` +"###, + DANGER + ), + r###"

<http://foo.bar.baz>`

+"###, + r###"Code spans (344)"### + ); + + assert_eq!( + micromark_with_options( + r###"` +"###, + DANGER + ), + r###"

http://foo.bar.`baz`

+"###, + r###"Code spans (345)"### + ); + + assert_eq!( + micromark_with_options( + r###"```foo`` +"###, + DANGER + ), + r###"

```foo``

+"###, + r###"Code spans (346)"### + ); + + assert_eq!( + micromark_with_options( + r###"`foo +"###, + DANGER + ), + r###"

`foo

+"###, + r###"Code spans (347)"### + ); + + assert_eq!( + micromark_with_options( + r###"`foo``bar`` +"###, + DANGER + ), + r###"

`foobar

+"###, + r###"Code spans (348)"### + ); + + assert_eq!( + micromark_with_options( + r###"*foo bar* +"###, + DANGER + ), + r###"

foo bar

+"###, + r###"Emphasis and strong emphasis (349)"### + ); + + assert_eq!( + micromark_with_options( + r###"a * foo bar* +"###, + DANGER + ), + r###"

a * foo bar*

+"###, + r###"Emphasis and strong emphasis (350)"### + ); + + assert_eq!( + micromark_with_options( + r###"a*"foo"* +"###, + DANGER + ), + r###"

a*"foo"*

+"###, + r###"Emphasis and strong emphasis (351)"### + ); + + assert_eq!( + micromark_with_options( + r###"* a * +"###, + DANGER + ), + r###"

* a *

+"###, + r###"Emphasis and strong emphasis (352)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo*bar* +"###, + DANGER + ), + r###"

foobar

+"###, + r###"Emphasis and strong emphasis (353)"### + ); + + assert_eq!( + micromark_with_options( + r###"5*6*78 +"###, + DANGER + ), + r###"

5678

+"###, + r###"Emphasis and strong emphasis (354)"### + ); + + assert_eq!( + micromark_with_options( + r###"_foo bar_ +"###, + DANGER + ), + r###"

foo bar

+"###, + r###"Emphasis and strong emphasis (355)"### + ); + + assert_eq!( + micromark_with_options( + r###"_ foo bar_ +"###, + DANGER + ), + r###"

_ foo bar_

+"###, + r###"Emphasis and strong emphasis (356)"### + ); + + assert_eq!( + micromark_with_options( + r###"a_"foo"_ +"###, + DANGER + ), + r###"

a_"foo"_

+"###, + r###"Emphasis and strong emphasis (357)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo_bar_ +"###, + DANGER + ), + r###"

foo_bar_

+"###, + r###"Emphasis and strong emphasis (358)"### + ); + + assert_eq!( + micromark_with_options( + r###"5_6_78 +"###, + DANGER + ), + r###"

5_6_78

+"###, + r###"Emphasis and strong emphasis (359)"### + ); + + assert_eq!( + micromark_with_options( + r###"пристаням_стремятся_ +"###, + DANGER + ), + r###"

пристаням_стремятся_

+"###, + r###"Emphasis and strong emphasis (360)"### + ); + + assert_eq!( + micromark_with_options( + r###"aa_"bb"_cc +"###, + DANGER + ), + r###"

aa_"bb"_cc

+"###, + r###"Emphasis and strong emphasis (361)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo-_(bar)_ +"###, + DANGER + ), + r###"

foo-(bar)

+"###, + r###"Emphasis and strong emphasis (362)"### + ); + + assert_eq!( + micromark_with_options( + r###"_foo* +"###, + DANGER + ), + r###"

_foo*

+"###, + r###"Emphasis and strong emphasis (363)"### + ); + + assert_eq!( + micromark_with_options( + r###"*foo bar * +"###, + DANGER + ), + r###"

*foo bar *

+"###, + r###"Emphasis and strong emphasis (364)"### + ); + + assert_eq!( + micromark_with_options( + r###"*foo bar +* +"###, + DANGER + ), + r###"

*foo bar +*

+"###, + r###"Emphasis and strong emphasis (365)"### + ); + + assert_eq!( + micromark_with_options( + r###"*(*foo) +"###, + DANGER + ), + r###"

*(*foo)

+"###, + r###"Emphasis and strong emphasis (366)"### + ); + + assert_eq!( + micromark_with_options( + r###"*(*foo*)* +"###, + DANGER + ), + r###"

(foo)

+"###, + r###"Emphasis and strong emphasis (367)"### + ); + + assert_eq!( + micromark_with_options( + r###"*foo*bar +"###, + DANGER + ), + r###"

foobar

+"###, + r###"Emphasis and strong emphasis (368)"### + ); + + assert_eq!( + micromark_with_options( + r###"_foo bar _ +"###, + DANGER + ), + r###"

_foo bar _

+"###, + r###"Emphasis and strong emphasis (369)"### + ); + + assert_eq!( + micromark_with_options( + r###"_(_foo) +"###, + DANGER + ), + r###"

_(_foo)

+"###, + r###"Emphasis and strong emphasis (370)"### + ); + + assert_eq!( + micromark_with_options( + r###"_(_foo_)_ +"###, + DANGER + ), + r###"

(foo)

+"###, + r###"Emphasis and strong emphasis (371)"### + ); + + assert_eq!( + micromark_with_options( + r###"_foo_bar +"###, + DANGER + ), + r###"

_foo_bar

+"###, + r###"Emphasis and strong emphasis (372)"### + ); + + assert_eq!( + micromark_with_options( + r###"_пристаням_стремятся +"###, + DANGER + ), + r###"

_пристаням_стремятся

+"###, + r###"Emphasis and strong emphasis (373)"### + ); + + assert_eq!( + micromark_with_options( + r###"_foo_bar_baz_ +"###, + DANGER + ), + r###"

foo_bar_baz

+"###, + r###"Emphasis and strong emphasis (374)"### + ); + + assert_eq!( + micromark_with_options( + r###"_(bar)_. +"###, + DANGER + ), + r###"

(bar).

+"###, + r###"Emphasis and strong emphasis (375)"### + ); + + assert_eq!( + micromark_with_options( + r###"**foo bar** +"###, + DANGER + ), + r###"

foo bar

+"###, + r###"Emphasis and strong emphasis (376)"### + ); + + assert_eq!( + micromark_with_options( + r###"** foo bar** +"###, + DANGER + ), + r###"

** foo bar**

+"###, + r###"Emphasis and strong emphasis (377)"### + ); + + assert_eq!( + micromark_with_options( + r###"a**"foo"** +"###, + DANGER + ), + r###"

a**"foo"**

+"###, + r###"Emphasis and strong emphasis (378)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo**bar** +"###, + DANGER + ), + r###"

foobar

+"###, + r###"Emphasis and strong emphasis (379)"### + ); + + assert_eq!( + micromark_with_options( + r###"__foo bar__ +"###, + DANGER + ), + r###"

foo bar

+"###, + r###"Emphasis and strong emphasis (380)"### + ); + + assert_eq!( + micromark_with_options( + r###"__ foo bar__ +"###, + DANGER + ), + r###"

__ foo bar__

+"###, + r###"Emphasis and strong emphasis (381)"### + ); + + assert_eq!( + micromark_with_options( + r###"__ +foo bar__ +"###, + DANGER + ), + r###"

__ +foo bar__

+"###, + r###"Emphasis and strong emphasis (382)"### + ); + + assert_eq!( + micromark_with_options( + r###"a__"foo"__ +"###, + DANGER + ), + r###"

a__"foo"__

+"###, + r###"Emphasis and strong emphasis (383)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo__bar__ +"###, + DANGER + ), + r###"

foo__bar__

+"###, + r###"Emphasis and strong emphasis (384)"### + ); + + assert_eq!( + micromark_with_options( + r###"5__6__78 +"###, + DANGER + ), + r###"

5__6__78

+"###, + r###"Emphasis and strong emphasis (385)"### + ); + + assert_eq!( + micromark_with_options( + r###"пристаням__стремятся__ +"###, + DANGER + ), + r###"

пристаням__стремятся__

+"###, + r###"Emphasis and strong emphasis (386)"### + ); + + assert_eq!( + micromark_with_options( + r###"__foo, __bar__, baz__ +"###, + DANGER + ), + r###"

foo, bar, baz

+"###, + r###"Emphasis and strong emphasis (387)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo-__(bar)__ +"###, + DANGER + ), + r###"

foo-(bar)

+"###, + r###"Emphasis and strong emphasis (388)"### + ); + + assert_eq!( + micromark_with_options( + r###"**foo bar ** +"###, + DANGER + ), + r###"

**foo bar **

+"###, + r###"Emphasis and strong emphasis (389)"### + ); + + assert_eq!( + micromark_with_options( + r###"**(**foo) +"###, + DANGER + ), + r###"

**(**foo)

+"###, + r###"Emphasis and strong emphasis (390)"### + ); + + assert_eq!( + micromark_with_options( + r###"*(**foo**)* +"###, + DANGER + ), + r###"

(foo)

+"###, + r###"Emphasis and strong emphasis (391)"### + ); + + assert_eq!( + micromark_with_options( + r###"**Gomphocarpus (*Gomphocarpus physocarpus*, syn. +*Asclepias physocarpa*)** +"###, + DANGER + ), + r###"

Gomphocarpus (Gomphocarpus physocarpus, syn. +Asclepias physocarpa)

+"###, + r###"Emphasis and strong emphasis (392)"### + ); + + assert_eq!( + micromark_with_options( + r###"**foo "*bar*" foo** +"###, + DANGER + ), + r###"

foo "bar" foo

+"###, + r###"Emphasis and strong emphasis (393)"### + ); + + assert_eq!( + micromark_with_options( + r###"**foo**bar +"###, + DANGER + ), + r###"

foobar

+"###, + r###"Emphasis and strong emphasis (394)"### + ); + + assert_eq!( + micromark_with_options( + r###"__foo bar __ +"###, + DANGER + ), + r###"

__foo bar __

+"###, + r###"Emphasis and strong emphasis (395)"### + ); + + assert_eq!( + micromark_with_options( + r###"__(__foo) +"###, + DANGER + ), + r###"

__(__foo)

+"###, + r###"Emphasis and strong emphasis (396)"### + ); + + assert_eq!( + micromark_with_options( + r###"_(__foo__)_ +"###, + DANGER + ), + r###"

(foo)

+"###, + r###"Emphasis and strong emphasis (397)"### + ); + + assert_eq!( + micromark_with_options( + r###"__foo__bar +"###, + DANGER + ), + r###"

__foo__bar

+"###, + r###"Emphasis and strong emphasis (398)"### + ); + + assert_eq!( + micromark_with_options( + r###"__пристаням__стремятся +"###, + DANGER + ), + r###"

__пристаням__стремятся

+"###, + r###"Emphasis and strong emphasis (399)"### + ); + + assert_eq!( + micromark_with_options( + r###"__foo__bar__baz__ +"###, + DANGER + ), + r###"

foo__bar__baz

+"###, + r###"Emphasis and strong emphasis (400)"### + ); + + assert_eq!( + micromark_with_options( + r###"__(bar)__. +"###, + DANGER + ), + r###"

(bar).

+"###, + r###"Emphasis and strong emphasis (401)"### + ); + + assert_eq!( + micromark_with_options( + r###"*foo [bar](/url)* +"###, + DANGER + ), + r###"

foo bar

+"###, + r###"Emphasis and strong emphasis (402)"### + ); + + assert_eq!( + micromark_with_options( + r###"*foo +bar* +"###, + DANGER + ), + r###"

foo +bar

+"###, + r###"Emphasis and strong emphasis (403)"### + ); + + assert_eq!( + micromark_with_options( + r###"_foo __bar__ baz_ +"###, + DANGER + ), + r###"

foo bar baz

+"###, + r###"Emphasis and strong emphasis (404)"### + ); + + assert_eq!( + micromark_with_options( + r###"_foo _bar_ baz_ +"###, + DANGER + ), + r###"

foo bar baz

+"###, + r###"Emphasis and strong emphasis (405)"### + ); + + assert_eq!( + micromark_with_options( + r###"__foo_ bar_ +"###, + DANGER + ), + r###"

foo bar

+"###, + r###"Emphasis and strong emphasis (406)"### + ); + + assert_eq!( + micromark_with_options( + r###"*foo *bar** +"###, + DANGER + ), + r###"

foo bar

+"###, + r###"Emphasis and strong emphasis (407)"### + ); + + assert_eq!( + micromark_with_options( + r###"*foo **bar** baz* +"###, + DANGER + ), + r###"

foo bar baz

+"###, + r###"Emphasis and strong emphasis (408)"### + ); + + assert_eq!( + micromark_with_options( + r###"*foo**bar**baz* +"###, + DANGER + ), + r###"

foobarbaz

+"###, + r###"Emphasis and strong emphasis (409)"### + ); + + assert_eq!( + micromark_with_options( + r###"*foo**bar* +"###, + DANGER + ), + r###"

foo**bar

+"###, + r###"Emphasis and strong emphasis (410)"### + ); + + assert_eq!( + micromark_with_options( + r###"***foo** bar* +"###, + DANGER + ), + r###"

foo bar

+"###, + r###"Emphasis and strong emphasis (411)"### + ); + + assert_eq!( + micromark_with_options( + r###"*foo **bar*** +"###, + DANGER + ), + r###"

foo bar

+"###, + r###"Emphasis and strong emphasis (412)"### + ); + + assert_eq!( + micromark_with_options( + r###"*foo**bar*** +"###, + DANGER + ), + r###"

foobar

+"###, + r###"Emphasis and strong emphasis (413)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo***bar***baz +"###, + DANGER + ), + r###"

foobarbaz

+"###, + r###"Emphasis and strong emphasis (414)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo******bar*********baz +"###, + DANGER + ), + r###"

foobar***baz

+"###, + r###"Emphasis and strong emphasis (415)"### + ); + + assert_eq!( + micromark_with_options( + r###"*foo **bar *baz* bim** bop* +"###, + DANGER + ), + r###"

foo bar baz bim bop

+"###, + r###"Emphasis and strong emphasis (416)"### + ); + + assert_eq!( + micromark_with_options( + r###"*foo [*bar*](/url)* +"###, + DANGER + ), + r###"

foo bar

+"###, + r###"Emphasis and strong emphasis (417)"### + ); + + assert_eq!( + micromark_with_options( + r###"** is not an empty emphasis +"###, + DANGER + ), + r###"

** is not an empty emphasis

+"###, + r###"Emphasis and strong emphasis (418)"### + ); + + assert_eq!( + micromark_with_options( + r###"**** is not an empty strong emphasis +"###, + DANGER + ), + r###"

**** is not an empty strong emphasis

+"###, + r###"Emphasis and strong emphasis (419)"### + ); + + assert_eq!( + micromark_with_options( + r###"**foo [bar](/url)** +"###, + DANGER + ), + r###"

foo bar

+"###, + r###"Emphasis and strong emphasis (420)"### + ); + + assert_eq!( + micromark_with_options( + r###"**foo +bar** +"###, + DANGER + ), + r###"

foo +bar

+"###, + r###"Emphasis and strong emphasis (421)"### + ); + + assert_eq!( + micromark_with_options( + r###"__foo _bar_ baz__ +"###, + DANGER + ), + r###"

foo bar baz

+"###, + r###"Emphasis and strong emphasis (422)"### + ); + + assert_eq!( + micromark_with_options( + r###"__foo __bar__ baz__ +"###, + DANGER + ), + r###"

foo bar baz

+"###, + r###"Emphasis and strong emphasis (423)"### + ); + + assert_eq!( + micromark_with_options( + r###"____foo__ bar__ +"###, + DANGER + ), + r###"

foo bar

+"###, + r###"Emphasis and strong emphasis (424)"### + ); + + assert_eq!( + micromark_with_options( + r###"**foo **bar**** +"###, + DANGER + ), + r###"

foo bar

+"###, + r###"Emphasis and strong emphasis (425)"### + ); + + assert_eq!( + micromark_with_options( + r###"**foo *bar* baz** +"###, + DANGER + ), + r###"

foo bar baz

+"###, + r###"Emphasis and strong emphasis (426)"### + ); + + assert_eq!( + micromark_with_options( + r###"**foo*bar*baz** +"###, + DANGER + ), + r###"

foobarbaz

+"###, + r###"Emphasis and strong emphasis (427)"### + ); + + assert_eq!( + micromark_with_options( + r###"***foo* bar** +"###, + DANGER + ), + r###"

foo bar

+"###, + r###"Emphasis and strong emphasis (428)"### + ); + + assert_eq!( + micromark_with_options( + r###"**foo *bar*** +"###, + DANGER + ), + r###"

foo bar

+"###, + r###"Emphasis and strong emphasis (429)"### + ); + + assert_eq!( + micromark_with_options( + r###"**foo *bar **baz** +bim* bop** +"###, + DANGER + ), + r###"

foo bar baz +bim bop

+"###, + r###"Emphasis and strong emphasis (430)"### + ); + + assert_eq!( + micromark_with_options( + r###"**foo [*bar*](/url)** +"###, + DANGER + ), + r###"

foo bar

+"###, + r###"Emphasis and strong emphasis (431)"### + ); + + assert_eq!( + micromark_with_options( + r###"__ is not an empty emphasis +"###, + DANGER + ), + r###"

__ is not an empty emphasis

+"###, + r###"Emphasis and strong emphasis (432)"### + ); + + assert_eq!( + micromark_with_options( + r###"____ is not an empty strong emphasis +"###, + DANGER + ), + r###"

____ is not an empty strong emphasis

+"###, + r###"Emphasis and strong emphasis (433)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo *** +"###, + DANGER + ), + r###"

foo ***

+"###, + r###"Emphasis and strong emphasis (434)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo *\** +"###, + DANGER + ), + r###"

foo *

+"###, + r###"Emphasis and strong emphasis (435)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo *_* +"###, + DANGER + ), + r###"

foo _

+"###, + r###"Emphasis and strong emphasis (436)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo ***** +"###, + DANGER + ), + r###"

foo *****

+"###, + r###"Emphasis and strong emphasis (437)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo **\*** +"###, + DANGER + ), + r###"

foo *

+"###, + r###"Emphasis and strong emphasis (438)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo **_** +"###, + DANGER + ), + r###"

foo _

+"###, + r###"Emphasis and strong emphasis (439)"### + ); + + assert_eq!( + micromark_with_options( + r###"**foo* +"###, + DANGER + ), + r###"

*foo

+"###, + r###"Emphasis and strong emphasis (440)"### + ); + + assert_eq!( + micromark_with_options( + r###"*foo** +"###, + DANGER + ), + r###"

foo*

+"###, + r###"Emphasis and strong emphasis (441)"### + ); + + assert_eq!( + micromark_with_options( + r###"***foo** +"###, + DANGER + ), + r###"

*foo

+"###, + r###"Emphasis and strong emphasis (442)"### + ); + + assert_eq!( + micromark_with_options( + r###"****foo* +"###, + DANGER + ), + r###"

***foo

+"###, + r###"Emphasis and strong emphasis (443)"### + ); + + assert_eq!( + micromark_with_options( + r###"**foo*** +"###, + DANGER + ), + r###"

foo*

+"###, + r###"Emphasis and strong emphasis (444)"### + ); + + assert_eq!( + micromark_with_options( + r###"*foo**** +"###, + DANGER + ), + r###"

foo***

+"###, + r###"Emphasis and strong emphasis (445)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo ___ +"###, + DANGER + ), + r###"

foo ___

+"###, + r###"Emphasis and strong emphasis (446)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo _\__ +"###, + DANGER + ), + r###"

foo _

+"###, + r###"Emphasis and strong emphasis (447)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo _*_ +"###, + DANGER + ), + r###"

foo *

+"###, + r###"Emphasis and strong emphasis (448)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo _____ +"###, + DANGER + ), + r###"

foo _____

+"###, + r###"Emphasis and strong emphasis (449)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo __\___ +"###, + DANGER + ), + r###"

foo _

+"###, + r###"Emphasis and strong emphasis (450)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo __*__ +"###, + DANGER + ), + r###"

foo *

+"###, + r###"Emphasis and strong emphasis (451)"### + ); + + assert_eq!( + micromark_with_options( + r###"__foo_ +"###, + DANGER + ), + r###"

_foo

+"###, + r###"Emphasis and strong emphasis (452)"### + ); + + assert_eq!( + micromark_with_options( + r###"_foo__ +"###, + DANGER + ), + r###"

foo_

+"###, + r###"Emphasis and strong emphasis (453)"### + ); + + assert_eq!( + micromark_with_options( + r###"___foo__ +"###, + DANGER + ), + r###"

_foo

+"###, + r###"Emphasis and strong emphasis (454)"### + ); + + assert_eq!( + micromark_with_options( + r###"____foo_ +"###, + DANGER + ), + r###"

___foo

+"###, + r###"Emphasis and strong emphasis (455)"### + ); + + assert_eq!( + micromark_with_options( + r###"__foo___ +"###, + DANGER + ), + r###"

foo_

+"###, + r###"Emphasis and strong emphasis (456)"### + ); + + assert_eq!( + micromark_with_options( + r###"_foo____ +"###, + DANGER + ), + r###"

foo___

+"###, + r###"Emphasis and strong emphasis (457)"### + ); + + assert_eq!( + micromark_with_options( + r###"**foo** +"###, + DANGER + ), + r###"

foo

+"###, + r###"Emphasis and strong emphasis (458)"### + ); + + assert_eq!( + micromark_with_options( + r###"*_foo_* +"###, + DANGER + ), + r###"

foo

+"###, + r###"Emphasis and strong emphasis (459)"### + ); + + assert_eq!( + micromark_with_options( + r###"__foo__ +"###, + DANGER + ), + r###"

foo

+"###, + r###"Emphasis and strong emphasis (460)"### + ); + + assert_eq!( + micromark_with_options( + r###"_*foo*_ +"###, + DANGER + ), + r###"

foo

+"###, + r###"Emphasis and strong emphasis (461)"### + ); + + assert_eq!( + micromark_with_options( + r###"****foo**** +"###, + DANGER + ), + r###"

foo

+"###, + r###"Emphasis and strong emphasis (462)"### + ); + + assert_eq!( + micromark_with_options( + r###"____foo____ +"###, + DANGER + ), + r###"

foo

+"###, + r###"Emphasis and strong emphasis (463)"### + ); + + assert_eq!( + micromark_with_options( + r###"******foo****** +"###, + DANGER + ), + r###"

foo

+"###, + r###"Emphasis and strong emphasis (464)"### + ); + + assert_eq!( + micromark_with_options( + r###"***foo*** +"###, + DANGER + ), + r###"

foo

+"###, + r###"Emphasis and strong emphasis (465)"### + ); + + assert_eq!( + micromark_with_options( + r###"_____foo_____ +"###, + DANGER + ), + r###"

foo

+"###, + r###"Emphasis and strong emphasis (466)"### + ); + + assert_eq!( + micromark_with_options( + r###"*foo _bar* baz_ +"###, + DANGER + ), + r###"

foo _bar baz_

+"###, + r###"Emphasis and strong emphasis (467)"### + ); + + assert_eq!( + micromark_with_options( + r###"*foo __bar *baz bim__ bam* +"###, + DANGER + ), + r###"

foo bar *baz bim bam

+"###, + r###"Emphasis and strong emphasis (468)"### + ); + + assert_eq!( + micromark_with_options( + r###"**foo **bar baz** +"###, + DANGER + ), + r###"

**foo bar baz

+"###, + r###"Emphasis and strong emphasis (469)"### + ); + + assert_eq!( + micromark_with_options( + r###"*foo *bar baz* +"###, + DANGER + ), + r###"

*foo bar baz

+"###, + r###"Emphasis and strong emphasis (470)"### + ); + + assert_eq!( + micromark_with_options( + r###"*[bar*](/url) +"###, + DANGER + ), + r###"

*bar*

+"###, + r###"Emphasis and strong emphasis (471)"### + ); + + assert_eq!( + micromark_with_options( + r###"_foo [bar_](/url) +"###, + DANGER + ), + r###"

_foo bar_

+"###, + r###"Emphasis and strong emphasis (472)"### + ); + + assert_eq!( + micromark_with_options( + r###"* +"###, + DANGER + ), + r###"

*

+"###, + r###"Emphasis and strong emphasis (473)"### + ); + + assert_eq!( + micromark_with_options( + r###"** +"###, + DANGER + ), + r###"

**

+"###, + r###"Emphasis and strong emphasis (474)"### + ); + + assert_eq!( + micromark_with_options( + r###"__ +"###, + DANGER + ), + r###"

__

+"###, + r###"Emphasis and strong emphasis (475)"### + ); + + assert_eq!( + micromark_with_options( + r###"*a `*`* +"###, + DANGER + ), + r###"

a *

+"###, + r###"Emphasis and strong emphasis (476)"### + ); + + assert_eq!( + micromark_with_options( + r###"_a `_`_ +"###, + DANGER + ), + r###"

a _

+"###, + r###"Emphasis and strong emphasis (477)"### + ); + + assert_eq!( + micromark_with_options( + r###"**a +"###, + DANGER + ), + r###"

**ahttp://foo.bar/?q=**

+"###, + r###"Emphasis and strong emphasis (478)"### + ); + + assert_eq!( + micromark_with_options( + r###"__a +"###, + DANGER + ), + r###"

__ahttp://foo.bar/?q=__

+"###, + r###"Emphasis and strong emphasis (479)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link](/uri "title") +"###, + DANGER + ), + r###"

link

+"###, + r###"Links (480)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link](/uri) +"###, + DANGER + ), + r###"

link

+"###, + r###"Links (481)"### + ); + + assert_eq!( + micromark_with_options( + r###"[](./target.md) +"###, + DANGER + ), + r###"

+"###, + r###"Links (482)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link]() +"###, + DANGER + ), + r###"

link

+"###, + r###"Links (483)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link](<>) +"###, + DANGER + ), + r###"

link

+"###, + r###"Links (484)"### + ); + + assert_eq!( + micromark_with_options( + r###"[]() +"###, + DANGER + ), + r###"

+"###, + r###"Links (485)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link](/my uri) +"###, + DANGER + ), + r###"

[link](/my uri)

+"###, + r###"Links (486)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link](
) +"###, + DANGER + ), + r###"

link

+"###, + r###"Links (487)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link](foo +bar) +"###, + DANGER + ), + r###"

[link](foo +bar)

+"###, + r###"Links (488)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link]() +"###, + DANGER + ), + r###"

[link]()

+"###, + r###"Links (489)"### + ); + + assert_eq!( + micromark_with_options( + r###"[a]() +"###, + DANGER + ), + r###"

a

+"###, + r###"Links (490)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link]() +"###, + DANGER + ), + r###"

[link](<foo>)

+"###, + r###"Links (491)"### + ); + + assert_eq!( + micromark_with_options( + r###"[a]( +[a](c) +"###, + DANGER + ), + r###"

[a](<b)c +[a](<b)c> +[a](c)

+"###, + r###"Links (492)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link](\(foo\)) +"###, + DANGER + ), + r###"

link

+"###, + r###"Links (493)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link](foo(and(bar))) +"###, + DANGER + ), + r###"

link

+"###, + r###"Links (494)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link](foo(and(bar)) +"###, + DANGER + ), + r###"

[link](foo(and(bar))

+"###, + r###"Links (495)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link](foo\(and\(bar\)) +"###, + DANGER + ), + r###"

link

+"###, + r###"Links (496)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link]() +"###, + DANGER + ), + r###"

link

+"###, + r###"Links (497)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link](foo\)\:) +"###, + DANGER + ), + r###"

link

+"###, + r###"Links (498)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link](#fragment) + +[link](http://example.com#fragment) + +[link](http://example.com?foo=3#frag) +"###, + DANGER + ), + r###"

link

+

link

+

link

+"###, + r###"Links (499)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link](foo\bar) +"###, + DANGER + ), + r###"

link

+"###, + r###"Links (500)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link](foo%20bä) +"###, + DANGER + ), + r###"

link

+"###, + r###"Links (501)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link]("title") +"###, + DANGER + ), + r###"

link

+"###, + r###"Links (502)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link](/url "title") +[link](/url 'title') +[link](/url (title)) +"###, + DANGER + ), + r###"

link +link +link

+"###, + r###"Links (503)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link](/url "title \""") +"###, + DANGER + ), + r###"

link

+"###, + r###"Links (504)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link](/url "title") +"###, + DANGER + ), + r###"

link

+"###, + r###"Links (505)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link](/url "title "and" title") +"###, + DANGER + ), + r###"

[link](/url "title "and" title")

+"###, + r###"Links (506)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link](/url 'title "and" title') +"###, + DANGER + ), + r###"

link

+"###, + r###"Links (507)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link]( /uri + "title" ) +"###, + DANGER + ), + r###"

link

+"###, + r###"Links (508)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link] (/uri) +"###, + DANGER + ), + r###"

[link] (/uri)

+"###, + r###"Links (509)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link [foo [bar]]](/uri) +"###, + DANGER + ), + r###"

link [foo [bar]]

+"###, + r###"Links (510)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link] bar](/uri) +"###, + DANGER + ), + r###"

[link] bar](/uri)

+"###, + r###"Links (511)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link [bar](/uri) +"###, + DANGER + ), + r###"

[link bar

+"###, + r###"Links (512)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link \[bar](/uri) +"###, + DANGER + ), + r###"

link [bar

+"###, + r###"Links (513)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link *foo **bar** `#`*](/uri) +"###, + DANGER + ), + r###"

link foo bar #

+"###, + r###"Links (514)"### + ); + + assert_eq!( + micromark_with_options( + r###"[![moon](moon.jpg)](/uri) +"###, + DANGER + ), + r###"

moon

+"###, + r###"Links (515)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo [bar](/uri)](/uri) +"###, + DANGER + ), + r###"

[foo bar](/uri)

+"###, + r###"Links (516)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo *[bar [baz](/uri)](/uri)*](/uri) +"###, + DANGER + ), + r###"

[foo [bar baz](/uri)](/uri)

+"###, + r###"Links (517)"### + ); + + assert_eq!( + micromark_with_options( + r###"![[[foo](uri1)](uri2)](uri3) +"###, + DANGER + ), + r###"

[foo](uri2)

+"###, + r###"Links (518)"### + ); + + assert_eq!( + micromark_with_options( + r###"*[foo*](/uri) +"###, + DANGER + ), + r###"

*foo*

+"###, + r###"Links (519)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo *bar](baz*) +"###, + DANGER + ), + r###"

foo *bar

+"###, + r###"Links (520)"### + ); + + assert_eq!( + micromark_with_options( + r###"*foo [bar* baz] +"###, + DANGER + ), + r###"

foo [bar baz]

+"###, + r###"Links (521)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo +"###, + DANGER + ), + r###"

[foo

+"###, + r###"Links (522)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo`](/uri)` +"###, + DANGER + ), + r###"

[foo](/uri)

+"###, + r###"Links (523)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo +"###, + DANGER + ), + r###"

[foohttp://example.com/?search=](uri)

+"###, + r###"Links (524)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo][bar] + +[bar]: /url "title" +"###, + DANGER + ), + r###"

foo

+"###, + r###"Links (525)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link [foo [bar]]][ref] + +[ref]: /uri +"###, + DANGER + ), + r###"

link [foo [bar]]

+"###, + r###"Links (526)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link \[bar][ref] + +[ref]: /uri +"###, + DANGER + ), + r###"

link [bar

+"###, + r###"Links (527)"### + ); + + assert_eq!( + micromark_with_options( + r###"[link *foo **bar** `#`*][ref] + +[ref]: /uri +"###, + DANGER + ), + r###"

link foo bar #

+"###, + r###"Links (528)"### + ); + + assert_eq!( + micromark_with_options( + r###"[![moon](moon.jpg)][ref] + +[ref]: /uri +"###, + DANGER + ), + r###"

moon

+"###, + r###"Links (529)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo [bar](/uri)][ref] + +[ref]: /uri +"###, + DANGER + ), + r###"

[foo bar]ref

+"###, + r###"Links (530)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo *bar [baz][ref]*][ref] + +[ref]: /uri +"###, + DANGER + ), + r###"

[foo bar baz]ref

+"###, + r###"Links (531)"### + ); + + assert_eq!( + micromark_with_options( + r###"*[foo*][ref] + +[ref]: /uri +"###, + DANGER + ), + r###"

*foo*

+"###, + r###"Links (532)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo *bar][ref]* + +[ref]: /uri +"###, + DANGER + ), + r###"

foo *bar*

+"###, + r###"Links (533)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo + +[ref]: /uri +"###, + DANGER + ), + r###"

[foo

+"###, + r###"Links (534)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo`][ref]` + +[ref]: /uri +"###, + DANGER + ), + r###"

[foo][ref]

+"###, + r###"Links (535)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo + +[ref]: /uri +"###, + DANGER + ), + r###"

[foohttp://example.com/?search=][ref]

+"###, + r###"Links (536)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo][BaR] + +[bar]: /url "title" +"###, + DANGER + ), + r###"

foo

+"###, + r###"Links (537)"### + ); + + // To do: bug with unicode normalization. + // assert_eq!( + // micromark_with_options( + // r###"[ẞ] + + // [SS]: /url + // "###, + // DANGER + // ), + // r###"

+ // "###, + // r###"Links (538)"### + // ); + + assert_eq!( + micromark_with_options( + r###"[Foo + bar]: /url + +[Baz][Foo bar] +"###, + DANGER + ), + r###"

Baz

+"###, + r###"Links (539)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo] [bar] + +[bar]: /url "title" +"###, + DANGER + ), + r###"

[foo] bar

+"###, + r###"Links (540)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo] +[bar] + +[bar]: /url "title" +"###, + DANGER + ), + r###"

[foo] +bar

+"###, + r###"Links (541)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo]: /url1 + +[foo]: /url2 + +[bar][foo] +"###, + DANGER + ), + r###"

bar

+"###, + r###"Links (542)"### + ); + + assert_eq!( + micromark_with_options( + r###"[bar][foo\!] + +[foo!]: /url +"###, + DANGER + ), + r###"

[bar][foo!]

+"###, + r###"Links (543)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo][ref[] + +[ref[]: /uri +"###, + DANGER + ), + r###"

[foo][ref[]

+

[ref[]: /uri

+"###, + r###"Links (544)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo][ref[bar]] + +[ref[bar]]: /uri +"###, + DANGER + ), + r###"

[foo][ref[bar]]

+

[ref[bar]]: /uri

+"###, + r###"Links (545)"### + ); + + assert_eq!( + micromark_with_options( + r###"[[[foo]]] + +[[[foo]]]: /url +"###, + DANGER + ), + r###"

[[[foo]]]

+

[[[foo]]]: /url

+"###, + r###"Links (546)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo][ref\[] + +[ref\[]: /uri +"###, + DANGER + ), + r###"

foo

+"###, + r###"Links (547)"### + ); + + assert_eq!( + micromark_with_options( + r###"[bar\\]: /uri + +[bar\\] +"###, + DANGER + ), + r###"

bar\

+"###, + r###"Links (548)"### + ); + + assert_eq!( + micromark_with_options( + r###"[] + +[]: /uri +"###, + DANGER + ), + r###"

[]

+

[]: /uri

+"###, + r###"Links (549)"### + ); + + assert_eq!( + micromark_with_options( + r###"[ + ] + +[ + ]: /uri +"###, + DANGER + ), + r###"

[ +]

+

[ +]: /uri

+"###, + r###"Links (550)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo][] + +[foo]: /url "title" +"###, + DANGER + ), + r###"

foo

+"###, + r###"Links (551)"### + ); + + assert_eq!( + micromark_with_options( + r###"[*foo* bar][] + +[*foo* bar]: /url "title" +"###, + DANGER + ), + r###"

foo bar

+"###, + r###"Links (552)"### + ); + + assert_eq!( + micromark_with_options( + r###"[Foo][] + +[foo]: /url "title" +"###, + DANGER + ), + r###"

Foo

+"###, + r###"Links (553)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo] +[] + +[foo]: /url "title" +"###, + DANGER + ), + r###"

foo +[]

+"###, + r###"Links (554)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo] + +[foo]: /url "title" +"###, + DANGER + ), + r###"

foo

+"###, + r###"Links (555)"### + ); + + assert_eq!( + micromark_with_options( + r###"[*foo* bar] + +[*foo* bar]: /url "title" +"###, + DANGER + ), + r###"

foo bar

+"###, + r###"Links (556)"### + ); + + assert_eq!( + micromark_with_options( + r###"[[*foo* bar]] + +[*foo* bar]: /url "title" +"###, + DANGER + ), + r###"

[foo bar]

+"###, + r###"Links (557)"### + ); + + assert_eq!( + micromark_with_options( + r###"[[bar [foo] + +[foo]: /url +"###, + DANGER + ), + r###"

[[bar foo

+"###, + r###"Links (558)"### + ); + + assert_eq!( + micromark_with_options( + r###"[Foo] + +[foo]: /url "title" +"###, + DANGER + ), + r###"

Foo

+"###, + r###"Links (559)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo] bar + +[foo]: /url +"###, + DANGER + ), + r###"

foo bar

+"###, + r###"Links (560)"### + ); + + assert_eq!( + micromark_with_options( + r###"\[foo] + +[foo]: /url "title" +"###, + DANGER + ), + r###"

[foo]

+"###, + r###"Links (561)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo*]: /url + +*[foo*] +"###, + DANGER + ), + r###"

*foo*

+"###, + r###"Links (562)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo][bar] + +[foo]: /url1 +[bar]: /url2 +"###, + DANGER + ), + r###"

foo

+"###, + r###"Links (563)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo][] + +[foo]: /url1 +"###, + DANGER + ), + r###"

foo

+"###, + r###"Links (564)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo]() + +[foo]: /url1 +"###, + DANGER + ), + r###"

foo

+"###, + r###"Links (565)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo](not a link) + +[foo]: /url1 +"###, + DANGER + ), + r###"

foo(not a link)

+"###, + r###"Links (566)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo][bar][baz] + +[baz]: /url +"###, + DANGER + ), + r###"

[foo]bar

+"###, + r###"Links (567)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo][bar][baz] + +[baz]: /url1 +[bar]: /url2 +"###, + DANGER + ), + r###"

foobaz

+"###, + r###"Links (568)"### + ); + + assert_eq!( + micromark_with_options( + r###"[foo][bar][baz] + +[baz]: /url1 +[foo]: /url2 +"###, + DANGER + ), + r###"

[foo]bar

+"###, + r###"Links (569)"### + ); + + assert_eq!( + micromark_with_options( + r###"![foo](/url "title") +"###, + DANGER + ), + r###"

foo

+"###, + r###"Images (570)"### + ); + + assert_eq!( + micromark_with_options( + r###"![foo *bar*] + +[foo *bar*]: train.jpg "train & tracks" +"###, + DANGER + ), + r###"

foo bar

+"###, + r###"Images (571)"### + ); + + assert_eq!( + micromark_with_options( + r###"![foo ![bar](/url)](/url2) +"###, + DANGER + ), + r###"

foo bar

+"###, + r###"Images (572)"### + ); + + assert_eq!( + micromark_with_options( + r###"![foo [bar](/url)](/url2) +"###, + DANGER + ), + r###"

foo bar

+"###, + r###"Images (573)"### + ); + + assert_eq!( + micromark_with_options( + r###"![foo *bar*][] + +[foo *bar*]: train.jpg "train & tracks" +"###, + DANGER + ), + r###"

foo bar

+"###, + r###"Images (574)"### + ); + + assert_eq!( + micromark_with_options( + r###"![foo *bar*][foobar] + +[FOOBAR]: train.jpg "train & tracks" +"###, + DANGER + ), + r###"

foo bar

+"###, + r###"Images (575)"### + ); + + assert_eq!( + micromark_with_options( + r###"![foo](train.jpg) +"###, + DANGER + ), + r###"

foo

+"###, + r###"Images (576)"### + ); + + assert_eq!( + micromark_with_options( + r###"My ![foo bar](/path/to/train.jpg "title" ) +"###, + DANGER + ), + r###"

My foo bar

+"###, + r###"Images (577)"### + ); + + assert_eq!( + micromark_with_options( + r###"![foo]() +"###, + DANGER + ), + r###"

foo

+"###, + r###"Images (578)"### + ); + + assert_eq!( + micromark_with_options( + r###"![](/url) +"###, + DANGER + ), + r###"

+"###, + r###"Images (579)"### + ); + + assert_eq!( + micromark_with_options( + r###"![foo][bar] + +[bar]: /url +"###, + DANGER + ), + r###"

foo

+"###, + r###"Images (580)"### + ); + + assert_eq!( + micromark_with_options( + r###"![foo][bar] + +[BAR]: /url +"###, + DANGER + ), + r###"

foo

+"###, + r###"Images (581)"### + ); + + assert_eq!( + micromark_with_options( + r###"![foo][] + +[foo]: /url "title" +"###, + DANGER + ), + r###"

foo

+"###, + r###"Images (582)"### + ); + + assert_eq!( + micromark_with_options( + r###"![*foo* bar][] + +[*foo* bar]: /url "title" +"###, + DANGER + ), + r###"

foo bar

+"###, + r###"Images (583)"### + ); + + assert_eq!( + micromark_with_options( + r###"![Foo][] + +[foo]: /url "title" +"###, + DANGER + ), + r###"

Foo

+"###, + r###"Images (584)"### + ); + + assert_eq!( + micromark_with_options( + r###"![foo] +[] + +[foo]: /url "title" +"###, + DANGER + ), + r###"

foo +[]

+"###, + r###"Images (585)"### + ); + + assert_eq!( + micromark_with_options( + r###"![foo] + +[foo]: /url "title" +"###, + DANGER + ), + r###"

foo

+"###, + r###"Images (586)"### + ); + + assert_eq!( + micromark_with_options( + r###"![*foo* bar] + +[*foo* bar]: /url "title" +"###, + DANGER + ), + r###"

foo bar

+"###, + r###"Images (587)"### + ); + + assert_eq!( + micromark_with_options( + r###"![[foo]] + +[[foo]]: /url "title" +"###, + DANGER + ), + r###"

![[foo]]

+

[[foo]]: /url "title"

+"###, + r###"Images (588)"### + ); + + assert_eq!( + micromark_with_options( + r###"![Foo] + +[foo]: /url "title" +"###, + DANGER + ), + r###"

Foo

+"###, + r###"Images (589)"### + ); + + assert_eq!( + micromark_with_options( + r###"!\[foo] + +[foo]: /url "title" +"###, + DANGER + ), + r###"

![foo]

+"###, + r###"Images (590)"### + ); + + assert_eq!( + micromark_with_options( + r###"\![foo] + +[foo]: /url "title" +"###, + DANGER + ), + r###"

!foo

+"###, + r###"Images (591)"### + ); + + assert_eq!( + micromark_with_options( + r###" +"###, + DANGER + ), + r###"

http://foo.bar.baz

+"###, + r###"Autolinks (592)"### + ); + + assert_eq!( + micromark_with_options( + r###" +"###, + DANGER + ), + r###"

http://foo.bar.baz/test?q=hello&id=22&boolean

+"###, + r###"Autolinks (593)"### + ); + + assert_eq!( + micromark_with_options( + r###" +"###, + DANGER + ), + r###"

irc://foo.bar:2233/baz

+"###, + r###"Autolinks (594)"### + ); + + assert_eq!( + micromark_with_options( + r###" +"###, + DANGER + ), + r###"

MAILTO:FOO@BAR.BAZ

+"###, + r###"Autolinks (595)"### + ); + + assert_eq!( + micromark_with_options( + r###" +"###, + DANGER + ), + r###"

a+b+c:d

+"###, + r###"Autolinks (596)"### + ); + + assert_eq!( + micromark_with_options( + r###" +"###, + DANGER + ), + r###"

made-up-scheme://foo,bar

+"###, + r###"Autolinks (597)"### + ); + + assert_eq!( + micromark_with_options( + r###" +"###, + DANGER + ), + r###"

http://../

+"###, + r###"Autolinks (598)"### + ); + + assert_eq!( + micromark_with_options( + r###" +"###, + DANGER + ), + r###"

localhost:5001/foo

+"###, + r###"Autolinks (599)"### + ); + + assert_eq!( + micromark_with_options( + r###" +"###, + DANGER + ), + r###"

<http://foo.bar/baz bim>

+"###, + r###"Autolinks (600)"### + ); + + assert_eq!( + micromark_with_options( + r###" +"###, + DANGER + ), + r###"

http://example.com/\[\

+"###, + r###"Autolinks (601)"### + ); + + assert_eq!( + micromark_with_options( + r###" +"###, + DANGER + ), + r###"

foo@bar.example.com

+"###, + r###"Autolinks (602)"### + ); + + assert_eq!( + micromark_with_options( + r###" +"###, + DANGER + ), + r###"

foo+special@Bar.baz-bar0.com

+"###, + r###"Autolinks (603)"### + ); + + assert_eq!( + micromark_with_options( + r###" +"###, + DANGER + ), + r###"

<foo+@bar.example.com>

+"###, + r###"Autolinks (604)"### + ); + + assert_eq!( + micromark_with_options( + r###"<> +"###, + DANGER + ), + r###"

<>

+"###, + r###"Autolinks (605)"### + ); + + assert_eq!( + micromark_with_options( + r###"< http://foo.bar > +"###, + DANGER + ), + r###"

< http://foo.bar >

+"###, + r###"Autolinks (606)"### + ); + + assert_eq!( + micromark_with_options( + r###" +"###, + DANGER + ), + r###"

<m:abc>

+"###, + r###"Autolinks (607)"### + ); + + assert_eq!( + micromark_with_options( + r###" +"###, + DANGER + ), + r###"

<foo.bar.baz>

+"###, + r###"Autolinks (608)"### + ); + + assert_eq!( + micromark_with_options( + r###"http://example.com +"###, + DANGER + ), + r###"

http://example.com

+"###, + r###"Autolinks (609)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo@bar.example.com +"###, + DANGER + ), + r###"

foo@bar.example.com

+"###, + r###"Autolinks (610)"### + ); + + assert_eq!( + micromark_with_options( + r###" +"###, + DANGER + ), + r###"

+"###, + r###"Raw HTML (611)"### + ); + + assert_eq!( + micromark_with_options( + r###" +"###, + DANGER + ), + r###"

+"###, + r###"Raw HTML (612)"### + ); + + assert_eq!( + micromark_with_options( + r###" +"###, + DANGER + ), + r###"

+"###, + r###"Raw HTML (613)"### + ); + + assert_eq!( + micromark_with_options( + r###" +"###, + DANGER + ), + r###"

+"###, + r###"Raw HTML (614)"### + ); + + assert_eq!( + micromark_with_options( + r###"Foo +"###, + DANGER + ), + r###"

Foo

+"###, + r###"Raw HTML (615)"### + ); + + assert_eq!( + micromark_with_options( + r###"<33> <__> +"###, + DANGER + ), + r###"

<33> <__>

+"###, + r###"Raw HTML (616)"### + ); + + assert_eq!( + micromark_with_options( + r###"
+"###, + DANGER + ), + r###"

<a h*#ref="hi">

+"###, + r###"Raw HTML (617)"### + ); + + assert_eq!( + micromark_with_options( + r###"
<a href="hi'> <a href=hi'>

+"###, + r###"Raw HTML (618)"### + ); + + assert_eq!( + micromark_with_options( + r###"< a>< +foo> + +"###, + DANGER + ), + r###"

< a>< +foo><bar/ > +<foo bar=baz +bim!bop />

+"###, + r###"Raw HTML (619)"### + ); + + assert_eq!( + micromark_with_options( + r###"
+"###, + DANGER + ), + r###"

<a href='bar'title=title>

+"###, + r###"Raw HTML (620)"### + ); + + assert_eq!( + micromark_with_options( + r###"
+"###, + DANGER + ), + r###"

+"###, + r###"Raw HTML (621)"### + ); + + assert_eq!( + micromark_with_options( + r###" +"###, + DANGER + ), + r###"

</a href="foo">

+"###, + r###"Raw HTML (622)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo +"###, + DANGER + ), + r###"

foo

+"###, + r###"Raw HTML (623)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo +"###, + DANGER + ), + r###"

foo <!-- not a comment -- two hyphens -->

+"###, + r###"Raw HTML (624)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo foo --> + +foo +"###, + DANGER + ), + r###"

foo <!--> foo -->

+

foo <!-- foo--->

+"###, + r###"Raw HTML (625)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo +"###, + DANGER + ), + r###"

foo

+"###, + r###"Raw HTML (626)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo +"###, + DANGER + ), + r###"

foo

+"###, + r###"Raw HTML (627)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo &<]]> +"###, + DANGER + ), + r###"

foo &<]]>

+"###, + r###"Raw HTML (628)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo +"###, + DANGER + ), + r###"

foo

+"###, + r###"Raw HTML (629)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo +"###, + DANGER + ), + r###"

foo

+"###, + r###"Raw HTML (630)"### + ); + + assert_eq!( + micromark_with_options( + r###" +"###, + DANGER + ), + r###"

<a href=""">

+"###, + r###"Raw HTML (631)"### + ); + + // To do: bug generating this file. + // assert_eq!( + // micromark_with_options( + // r###"foo + // baz + // "###, + // DANGER + // ), + // r###"

foo
+ // baz

+ // "###, + // r###"Hard line breaks (632)"### + // ); + + assert_eq!( + micromark_with_options( + r###"foo\ +baz +"###, + DANGER + ), + r###"

foo
+baz

+"###, + r###"Hard line breaks (633)"### + ); + + // To do: bug generating this file. + // assert_eq!( + // micromark_with_options( + // r###"foo + // baz + // "###, + // DANGER + // ), + // r###"

foo
+ // baz

+ // "###, + // r###"Hard line breaks (634)"### + // ); + + // To do: bug generating this file. + // assert_eq!( + // micromark_with_options( + // r###"foo + // bar + // "###, + // DANGER + // ), + // r###"

foo
+ // bar

+ // "###, + // r###"Hard line breaks (635)"### + // ); + + assert_eq!( + micromark_with_options( + r###"foo\ + bar +"###, + DANGER + ), + r###"

foo
+bar

+"###, + r###"Hard line breaks (636)"### + ); + + // To do: bug generating this file. + // assert_eq!( + // micromark_with_options( + // r###"*foo + // bar* + // "###, + // DANGER + // ), + // r###"

foo
+ // bar

+ // "###, + // r###"Hard line breaks (637)"### + // ); + + assert_eq!( + micromark_with_options( + r###"*foo\ +bar* +"###, + DANGER + ), + r###"

foo
+bar

+"###, + r###"Hard line breaks (638)"### + ); + + // To do: bug generating this file. + // assert_eq!( + // micromark_with_options( + // r###"`code + // span` + // "###, + // DANGER + // ), + // r###"

code span

+ // "###, + // r###"Hard line breaks (639)"### + // ); + + assert_eq!( + micromark_with_options( + r###"`code\ +span` +"###, + DANGER + ), + r###"

code\ span

+"###, + r###"Hard line breaks (640)"### + ); + + assert_eq!( + micromark_with_options( + r###"
+"###, + DANGER + ), + r###"

+"###, + r###"Hard line breaks (641)"### + ); + + assert_eq!( + micromark_with_options( + r###" +"###, + DANGER + ), + r###"

+"###, + r###"Hard line breaks (642)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo\ +"###, + DANGER + ), + r###"

foo\

+"###, + r###"Hard line breaks (643)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo +"###, + DANGER + ), + r###"

foo

+"###, + r###"Hard line breaks (644)"### + ); + + assert_eq!( + micromark_with_options( + r###"### foo\ +"###, + DANGER + ), + r###"

foo\

+"###, + r###"Hard line breaks (645)"### + ); + + assert_eq!( + micromark_with_options( + r###"### foo +"###, + DANGER + ), + r###"

foo

+"###, + r###"Hard line breaks (646)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo +baz +"###, + DANGER + ), + r###"

foo +baz

+"###, + r###"Soft line breaks (647)"### + ); + + assert_eq!( + micromark_with_options( + r###"foo + baz +"###, + DANGER + ), + r###"

foo +baz

+"###, + r###"Soft line breaks (648)"### + ); + + assert_eq!( + micromark_with_options( + r###"hello $.;'there +"###, + DANGER + ), + r###"

hello $.;'there

+"###, + r###"Textual content (649)"### + ); + + assert_eq!( + micromark_with_options( + r###"Foo χρῆν +"###, + DANGER + ), + r###"

Foo χρῆν

+"###, + r###"Textual content (650)"### + ); + + assert_eq!( + micromark_with_options( + r###"Multiple spaces +"###, + DANGER + ), + r###"

Multiple spaces

+"###, + r###"Textual content (651)"### + ); +} -- cgit