//! `CommonMark` test suite. // > 👉 **Important**: this module is generated by `generate/src/main.rs`. // > It is generate from the latest CommonMark website. use markdown::{to_html_with_options, CompileOptions, Options}; use pretty_assertions::assert_eq; #[rustfmt::skip] #[test] fn commonmark() -> Result<(), String> { let danger = Options { compile: CompileOptions { allow_dangerous_html: true, allow_dangerous_protocol: true, ..CompileOptions::default() }, ..Options::default() }; assert_eq!( to_html_with_options( r###" foo baz bim "###, &danger )?, r###"
foo baz bim
"###,
r###"Tabs (1)"###
);
assert_eq!(
to_html_with_options(
r###" foo baz bim
"###,
&danger
)?,
r###"foo baz bim
"###,
r###"Tabs (2)"###
);
assert_eq!(
to_html_with_options(
r###" a a
ὐ a
"###,
&danger
)?,
r###"a a
ὐ a
"###,
r###"Tabs (3)"###
);
assert_eq!(
to_html_with_options(
r###" - foo
bar
"###,
&danger
)?,
r###"foo
bar
foo
bar
"###, r###"Tabs (6)"### ); assert_eq!( to_html_with_options( r###"- foo "###, &danger )?, r###"foo
foo
foo
bar
"###,
r###"Tabs (8)"###
);
assert_eq!(
to_html_with_options(
r###" - foo
- bar
- baz
"###,
&danger
)?,
r###"!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
"###, r###"Backslash escapes (12)"### ); assert_eq!( to_html_with_options( r###"\ \A\a\ \3\φ\« "###, &danger )?, r###"\ \A\a\ \3\φ\«
"###, r###"Backslash escapes (13)"### ); assert_eq!( to_html_with_options( r###"\*not emphasized* \*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" ö not a character entity
"###, r###"Backslash escapes (14)"### ); assert_eq!( to_html_with_options( r###"\\*emphasis* "###, &danger )?, r###"\emphasis
"###, r###"Backslash escapes (15)"### ); assert_eq!( to_html_with_options( r###"foo\ bar "###, &danger )?, r###"foo
bar
\[\`
\[\]
"###,
r###"Backslash escapes (18)"###
);
assert_eq!(
to_html_with_options(
r###"~~~
\[\]
~~~
"###,
&danger
)?,
r###"\[\]
"###,
r###"Backslash escapes (19)"###
);
assert_eq!(
to_html_with_options(
r###"foo
"###,
r###"Backslash escapes (24)"###
);
assert_eq!(
to_html_with_options(
r###" & © Æ Ď
¾ ℋ ⅆ
∲ ≧̸
"###,
&danger
)?,
r###"& © Æ Ď ¾ ℋ ⅆ ∲ ≧̸
"###, r###"Entity and numeric character references (25)"### ); assert_eq!( to_html_with_options( r###"# Ӓ Ϡ "###, &danger )?, r###"# Ӓ Ϡ �
"###, r###"Entity and numeric character references (26)"### ); assert_eq!( to_html_with_options( r###"" ആ ಫ "###, &danger )?, r###"" ആ ಫ
"###, r###"Entity and numeric character references (27)"### ); assert_eq!( to_html_with_options( r###"  &x; abcdef0; &ThisIsNotDefined; &hi?; "###, &danger )?, r###"  &x; &#; &#x; � &#abcdef0; &ThisIsNotDefined; &hi?;
"###, r###"Entity and numeric character references (28)"### ); assert_eq!( to_html_with_options( r###"© "###, &danger )?, r###"©
"###, r###"Entity and numeric character references (29)"### ); assert_eq!( to_html_with_options( r###"&MadeUpEntity; "###, &danger )?, r###"&MadeUpEntity;
"###, r###"Entity and numeric character references (30)"### ); assert_eq!( to_html_with_options( r###" "###, &danger )?, r###" "###, r###"Entity and numeric character references (31)"### ); assert_eq!( to_html_with_options( r###"[foo](/föö "föö") "###, &danger )?, r###" "###, r###"Entity and numeric character references (32)"### ); assert_eq!( to_html_with_options( r###"[foo] [foo]: /föö "föö" "###, &danger )?, r###" "###, r###"Entity and numeric character references (33)"### ); assert_eq!( to_html_with_options( r###"``` föö foo ``` "###, &danger )?, r###"foo
"###,
r###"Entity and numeric character references (34)"###
);
assert_eq!(
to_html_with_options(
r###"`föö`
"###,
&danger
)?,
r###"föö
föfö
"###,
r###"Entity and numeric character references (36)"###
);
assert_eq!(
to_html_with_options(
r###"*foo*
*foo*
"###,
&danger
)?,
r###"*foo* foo
"###, r###"Entity and numeric character references (37)"### ); assert_eq!( to_html_with_options( r###"* foo * foo "###, &danger )?, r###"* foo
foo bar
"###, r###"Entity and numeric character references (39)"### ); assert_eq!( to_html_with_options( r###" foo "###, &danger )?, r###"foo
"###, r###"Entity and numeric character references (40)"### ); assert_eq!( to_html_with_options( r###"[a](url "tit") "###, &danger )?, r###"[a](url "tit")
"###, r###"Entity and numeric character references (41)"### ); assert_eq!( to_html_with_options( r###"- `one - two` "###, &danger )?, r###"+++
"###, r###"Thematic breaks (44)"### ); assert_eq!( to_html_with_options( r###"=== "###, &danger )?, r###"===
"###, r###"Thematic breaks (45)"### ); assert_eq!( to_html_with_options( r###"-- ** __ "###, &danger )?, r###"-- ** __
"###, r###"Thematic breaks (46)"### ); assert_eq!( to_html_with_options( r###" *** *** *** "###, &danger )?, r###"***
"###,
r###"Thematic breaks (48)"###
);
assert_eq!(
to_html_with_options(
r###"Foo
***
"###,
&danger
)?,
r###"Foo ***
"###, r###"Thematic breaks (49)"### ); assert_eq!( to_html_with_options( r###"_____________________________________ "###, &danger )?, r###"_ _ _ _ a
a------
---a---
"###, r###"Thematic breaks (55)"### ); assert_eq!( to_html_with_options( r###" *-* "###, &danger )?, r###"-
"###, r###"Thematic breaks (56)"### ); assert_eq!( to_html_with_options( r###"- foo *** - bar "###, &danger )?, r###"Foo
bar
"###, r###"Thematic breaks (58)"### ); assert_eq!( to_html_with_options( r###"Foo --- bar "###, &danger )?, r###"bar
"###, r###"Thematic breaks (59)"### ); assert_eq!( to_html_with_options( r###"* Foo * * * * Bar "###, &danger )?, r###"####### foo
"###, r###"ATX headings (63)"### ); assert_eq!( to_html_with_options( r###"#5 bolt #hashtag "###, &danger )?, r###"#5 bolt
#hashtag
"###, r###"ATX headings (64)"### ); assert_eq!( to_html_with_options( r###"\## foo "###, &danger )?, r###"## foo
"###, r###"ATX headings (65)"### ); assert_eq!( to_html_with_options( r###"# foo *bar* \*baz\* "###, &danger )?, r###"# foo
"###,
r###"ATX headings (69)"###
);
assert_eq!(
to_html_with_options(
r###"foo
# bar
"###,
&danger
)?,
r###"foo # bar
"###, r###"ATX headings (70)"### ); assert_eq!( to_html_with_options( r###"## foo ## ### bar ### "###, &danger )?, r###"Foo bar
Bar foo
"###, r###"ATX headings (78)"### ); assert_eq!( to_html_with_options( r###"## # ### ### "###, &danger )?, r###" "###, r###"ATX headings (79)"### ); assert_eq!( to_html_with_options( r###"Foo *bar* ========= Foo *bar* --------- "###, &danger )?, r###"Foo
---
Foo
Foo ---
"###, r###"Setext headings (87)"### ); assert_eq!( to_html_with_options( r###"Foo = = Foo --- - "###, &danger )?, r###"Foo = =
Foo
`
of dashes"/>
"###, r###"Setext headings (91)"### ); assert_eq!( to_html_with_options( r###"> Foo --- "###, &danger )?, r###"Foo
"###, r###"Setext headings (93)"### ); assert_eq!( to_html_with_options( r###"- Foo --- "###, &danger )?, r###"foo bar ===
Baz
"###, r###"Setext headings (96)"### ); assert_eq!( to_html_with_options( r###" ==== "###, &danger )?, r###"====
"###, r###"Setext headings (97)"### ); assert_eq!( to_html_with_options( r###"--- --- "###, &danger )?, r###"foo
foo
Foo
baz
"###, r###"Setext headings (103)"### ); assert_eq!( to_html_with_options( r###"Foo bar --- baz "###, &danger )?, r###"Foo bar
baz
"###, r###"Setext headings (104)"### ); assert_eq!( to_html_with_options( r###"Foo bar * * * baz "###, &danger )?, r###"Foo bar
baz
"###, r###"Setext headings (105)"### ); assert_eq!( to_html_with_options( r###"Foo bar \--- baz "###, &danger )?, r###"Foo bar --- baz
"###, r###"Setext headings (106)"### ); assert_eq!( to_html_with_options( r###" a simple indented code block "###, &danger )?, r###"a simple
indented code block
"###,
r###"Indented code blocks (107)"###
);
assert_eq!(
to_html_with_options(
r###" - foo
bar
"###,
&danger
)?,
r###"foo
bar
foo
<a/>
*hi*
- one
"###,
r###"Indented code blocks (110)"###
);
assert_eq!(
to_html_with_options(
r###" chunk1
chunk2
chunk3
"###,
&danger
)?,
r###"chunk1
chunk2
chunk3
"###,
r###"Indented code blocks (111)"###
);
assert_eq!(
to_html_with_options(
r###" chunk1
chunk2
"###,
&danger
)?,
r###"chunk1
chunk2
"###,
r###"Indented code blocks (112)"###
);
assert_eq!(
to_html_with_options(
r###"Foo
bar
"###,
&danger
)?,
r###"Foo bar
"###, r###"Indented code blocks (113)"### ); assert_eq!( to_html_with_options( r###" foo bar "###, &danger )?, r###"foo
bar
"###, r###"Indented code blocks (114)"### ); assert_eq!( to_html_with_options( r###"# Heading foo Heading ------ foo ---- "###, &danger )?, r###"foo
foo
foo
bar
"###,
r###"Indented code blocks (116)"###
);
assert_eq!(
to_html_with_options(
r###"
foo
"###,
&danger
)?,
r###"foo
"###,
r###"Indented code blocks (117)"###
);
assert_eq!(
to_html_with_options(
r###" foo
"###,
&danger
)?,
r###"foo
"###,
r###"Indented code blocks (118)"###
);
assert_eq!(
to_html_with_options(
r###"```
<
>
```
"###,
&danger
)?,
r###"<
>
"###,
r###"Fenced code blocks (119)"###
);
assert_eq!(
to_html_with_options(
r###"~~~
<
>
~~~
"###,
&danger
)?,
r###"<
>
"###,
r###"Fenced code blocks (120)"###
);
assert_eq!(
to_html_with_options(
r###"``
foo
``
"###,
&danger
)?,
r###"foo
aaa
~~~
"###,
r###"Fenced code blocks (122)"###
);
assert_eq!(
to_html_with_options(
r###"~~~
aaa
```
~~~
"###,
&danger
)?,
r###"aaa
```
"###,
r###"Fenced code blocks (123)"###
);
assert_eq!(
to_html_with_options(
r###"````
aaa
```
``````
"###,
&danger
)?,
r###"aaa
```
"###,
r###"Fenced code blocks (124)"###
);
assert_eq!(
to_html_with_options(
r###"~~~~
aaa
~~~
~~~~
"###,
&danger
)?,
r###"aaa
~~~
"###,
r###"Fenced code blocks (125)"###
);
assert_eq!(
to_html_with_options(
r###"```
"###,
&danger
)?,
r###"
"###,
r###"Fenced code blocks (126)"###
);
assert_eq!(
to_html_with_options(
r###"`````
```
aaa
"###,
&danger
)?,
r###"
```
aaa
"###,
r###"Fenced code blocks (127)"###
);
assert_eq!(
to_html_with_options(
r###"> ```
> aaa
bbb
"###,
&danger
)?,
r###"aaa
bbb
"###, r###"Fenced code blocks (128)"### ); assert_eq!( to_html_with_options( r###"``` ``` "###, &danger )?, r###"
"###,
r###"Fenced code blocks (129)"###
);
assert_eq!(
to_html_with_options(
r###"```
```
"###,
&danger
)?,
r###"
"###,
r###"Fenced code blocks (130)"###
);
assert_eq!(
to_html_with_options(
r###" ```
aaa
aaa
```
"###,
&danger
)?,
r###"aaa
aaa
"###,
r###"Fenced code blocks (131)"###
);
assert_eq!(
to_html_with_options(
r###" ```
aaa
aaa
aaa
```
"###,
&danger
)?,
r###"aaa
aaa
aaa
"###,
r###"Fenced code blocks (132)"###
);
assert_eq!(
to_html_with_options(
r###" ```
aaa
aaa
aaa
```
"###,
&danger
)?,
r###"aaa
aaa
aaa
"###,
r###"Fenced code blocks (133)"###
);
assert_eq!(
to_html_with_options(
r###" ```
aaa
```
"###,
&danger
)?,
r###"```
aaa
```
"###,
r###"Fenced code blocks (134)"###
);
assert_eq!(
to_html_with_options(
r###"```
aaa
```
"###,
&danger
)?,
r###"aaa
"###,
r###"Fenced code blocks (135)"###
);
assert_eq!(
to_html_with_options(
r###" ```
aaa
```
"###,
&danger
)?,
r###"aaa
"###,
r###"Fenced code blocks (136)"###
);
assert_eq!(
to_html_with_options(
r###"```
aaa
```
"###,
&danger
)?,
r###"aaa
```
"###,
r###"Fenced code blocks (137)"###
);
assert_eq!(
to_html_with_options(
r###"``` ```
aaa
"###,
&danger
)?,
r###"
aaa
aaa
~~~ ~~
"###,
r###"Fenced code blocks (139)"###
);
assert_eq!(
to_html_with_options(
r###"foo
```
bar
```
baz
"###,
&danger
)?,
r###"foo
bar
baz
"###, r###"Fenced code blocks (140)"### ); assert_eq!( to_html_with_options( r###"foo --- ~~~ bar ~~~ # baz "###, &danger )?, r###"bar
def foo(x)
return 3
end
"###,
r###"Fenced code blocks (142)"###
);
assert_eq!(
to_html_with_options(
r###"~~~~ ruby startline=3 $%@#$
def foo(x)
return 3
end
~~~~~~~
"###,
&danger
)?,
r###"def foo(x)
return 3
end
"###,
r###"Fenced code blocks (143)"###
);
assert_eq!(
to_html_with_options(
r###"````;
````
"###,
&danger
)?,
r###"
"###,
r###"Fenced code blocks (144)"###
);
assert_eq!(
to_html_with_options(
r###"``` aa ```
foo
"###,
&danger
)?,
r###"aa
foo
foo
"###,
r###"Fenced code blocks (146)"###
);
assert_eq!(
to_html_with_options(
r###"```
``` aaa
```
"###,
&danger
)?,
r###"``` aaa
"###,
r###"Fenced code blocks (147)"###
);
assert_eq!(
to_html_with_options(
r###"
**Hello**, _world_. |
**Hello**, |
hi |
hi |
okay.
"###, r###"HTML blocks (149)"### ); assert_eq!( to_html_with_options( r###" *foo* "###, r###"HTML blocks (151)"### ); assert_eq!( to_html_with_options( r###"Markdown
bar
"###, r###"HTML blocks (155)"### ); assert_eq!( to_html_with_options( r###" "###, &danger )?, r###" "###, r###"HTML blocks (159)"### ); assert_eq!( to_html_with_options( r###"foo |
foo |
foo
foo
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 (169)"### ); assert_eq!( to_html_with_options( r###" okay "###, &danger )?, r###"okay
"###, r###"HTML blocks (170)"### ); assert_eq!( to_html_with_options( r###" "###, &danger )?, r###" "###, r###"HTML blocks (171)"### ); assert_eq!( to_html_with_options( r###" okay "###, &danger )?, r###"okay
"###, r###"HTML blocks (172)"### ); assert_eq!( to_html_with_options( r###" *foo* "###, &danger )?, r###"foo
"###, r###"HTML blocks (176)"### ); assert_eq!( to_html_with_options( r###"*bar* *baz* "###, &danger )?, r###"*bar*baz
"###, r###"HTML blocks (177)"### ); assert_eq!( to_html_with_options( r###"1. *bar* "###, &danger )?, r###"1. *bar* "###, r###"HTML blocks (178)"### ); assert_eq!( to_html_with_options( r###" okay "###, &danger )?, r###"okay
"###, r###"HTML blocks (179)"### ); assert_eq!( to_html_with_options( r###"'; ?> okay "###, &danger )?, r###"'; ?>okay
"###, r###"HTML blocks (180)"### ); assert_eq!( to_html_with_options( r###" "###, &danger )?, r###" "###, r###"HTML blocks (181)"### ); assert_eq!( to_html_with_options( r###" okay "###, &danger )?, r###"okay
"###, r###"HTML blocks (182)"### ); assert_eq!( to_html_with_options( r###" "###, &danger )?, r###"<!-- foo -->
"###,
r###"HTML blocks (183)"###
);
assert_eq!(
to_html_with_options(
r###" <div>
"###,
r###"HTML blocks (184)"###
);
assert_eq!(
to_html_with_options(
r###"Foo
Foo
Foo baz
"###, r###"HTML blocks (187)"### ); assert_eq!( to_html_with_options( r###"Emphasized text.
Hi |
Hi |
Hi |
[foo]: /url 'title
with blank line'
[foo]
"###, r###"Link reference definitions (197)"### ); assert_eq!( to_html_with_options( r###"[foo]: /url [foo] "###, &danger )?, r###" "###, r###"Link reference definitions (198)"### ); assert_eq!( to_html_with_options( r###"[foo]: [foo] "###, &danger )?, r###"[foo]:
[foo]
"###, r###"Link reference definitions (199)"### ); assert_eq!( to_html_with_options( r###"[foo]: <> [foo] "###, &danger )?, r###" "###, r###"Link reference definitions (200)"### ); assert_eq!( to_html_with_options( r###"[foo]:[foo]:
[foo]
"###, r###"Link reference definitions (201)"### ); assert_eq!( to_html_with_options( r###"[foo]: /url\bar\*baz "foo\"bar\baz" [foo] "###, &danger )?, r###" "###, r###"Link reference definitions (202)"### ); assert_eq!( to_html_with_options( r###"[foo] [foo]: url "###, &danger )?, r###" "###, r###"Link reference definitions (203)"### ); assert_eq!( to_html_with_options( r###"[foo] [foo]: first [foo]: second "###, &danger )?, r###" "###, r###"Link reference definitions (204)"### ); assert_eq!( to_html_with_options( r###"[FOO]: /url [Foo] "###, &danger )?, r###" "###, r###"Link reference definitions (205)"### ); assert_eq!( to_html_with_options( r###"[ΑΓΩ]: /φου [αγω] "###, &danger )?, r###" "###, r###"Link reference definitions (206)"### ); assert_eq!( to_html_with_options( r###"[foo]: /url "###, &danger )?, r###""###, r###"Link reference definitions (207)"### ); assert_eq!( to_html_with_options( r###"[ foo ]: /url bar "###, &danger )?, r###"bar
"###, r###"Link reference definitions (208)"### ); assert_eq!( to_html_with_options( r###"[foo]: /url "title" ok "###, &danger )?, r###"[foo]: /url "title" ok
"###, r###"Link reference definitions (209)"### ); assert_eq!( to_html_with_options( r###"[foo]: /url "title" ok "###, &danger )?, r###""title" ok
"###, r###"Link reference definitions (210)"### ); assert_eq!( to_html_with_options( r###" [foo]: /url "title" [foo] "###, &danger )?, r###"[foo]: /url "title"
[foo]
"###, r###"Link reference definitions (211)"### ); assert_eq!( to_html_with_options( r###"``` [foo]: /url ``` [foo] "###, &danger )?, r###"[foo]: /url
[foo]
"###, r###"Link reference definitions (212)"### ); assert_eq!( to_html_with_options( r###"Foo [bar]: /baz [bar] "###, &danger )?, r###"Foo [bar]: /baz
[bar]
"###, r###"Link reference definitions (213)"### ); assert_eq!( to_html_with_options( r###"# [Foo] [foo]: /url > bar "###, &danger )?, r###""###, r###"Link reference definitions (214)"### ); assert_eq!( to_html_with_options( r###"[foo]: /url bar === [foo] "###, &danger )?, r###"bar
=== foo
"###, r###"Link reference definitions (216)"### ); assert_eq!( to_html_with_options( r###"[foo]: /foo-url "foo" [bar]: /bar-url "bar" [baz]: /baz-url [foo], [bar], [baz] "###, &danger )?, r###" "###, r###"Link reference definitions (217)"### ); assert_eq!( to_html_with_options( r###"[foo] > [foo]: /url "###, &danger )?, r###""###, r###"Link reference definitions (218)"### ); assert_eq!( to_html_with_options( r###"aaa bbb "###, &danger )?, r###"
aaa
bbb
"###, r###"Paragraphs (219)"### ); assert_eq!( to_html_with_options( r###"aaa bbb ccc ddd "###, &danger )?, r###"aaa bbb
ccc ddd
"###, r###"Paragraphs (220)"### ); assert_eq!( to_html_with_options( r###"aaa bbb "###, &danger )?, r###"aaa
bbb
"###, r###"Paragraphs (221)"### ); assert_eq!( to_html_with_options( r###" aaa bbb "###, &danger )?, r###"aaa bbb
"###, r###"Paragraphs (222)"### ); assert_eq!( to_html_with_options( r###"aaa bbb ccc "###, &danger )?, r###"aaa bbb ccc
"###, r###"Paragraphs (223)"### ); assert_eq!( to_html_with_options( r###" aaa bbb "###, &danger )?, r###"aaa bbb
"###, r###"Paragraphs (224)"### ); assert_eq!( to_html_with_options( r###" aaa bbb "###, &danger )?, r###"aaa
bbb
"###, r###"Paragraphs (225)"### ); assert_eq!( to_html_with_options( r###"aaa bbb "###, &danger )?, r###"aaa
bbb
aaa
"###, r###"Block quotes (228)"### ); assert_eq!( to_html_with_options( r###"># Foo >bar > baz "###, &danger )?, r###"Foo
bar baz
"###, r###"Block quotes (229)"### ); assert_eq!( to_html_with_options( r###" > # Foo > bar > baz "###, &danger )?, r###"Foo
bar baz
"###, r###"Block quotes (230)"### ); assert_eq!( to_html_with_options( r###" > # Foo > bar > baz "###, &danger )?, r###"Foo
bar baz
> # Foo
> bar
> baz
"###,
r###"Block quotes (231)"###
);
assert_eq!(
to_html_with_options(
r###"> # Foo
> bar
baz
"###,
&danger
)?,
r###""###, r###"Block quotes (232)"### ); assert_eq!( to_html_with_options( r###"> bar baz > foo "###, &danger )?, r###"Foo
bar baz
"###, r###"Block quotes (233)"### ); assert_eq!( to_html_with_options( r###"> foo --- "###, &danger )?, r###"bar baz foo
foo
- foo
foo
bar
"###,
r###"Block quotes (236)"###
);
assert_eq!(
to_html_with_options(
r###"> ```
foo
```
"###,
&danger
)?,
r###"foo
"###,
r###"Block quotes (237)"###
);
assert_eq!(
to_html_with_options(
r###"> foo
- bar
"###,
&danger
)?,
r###""###, r###"Block quotes (238)"### ); assert_eq!( to_html_with_options( r###"> "###, &danger )?, r###"foo - bar
"###, r###"Block quotes (239)"### ); assert_eq!( to_html_with_options( r###"> > > "###, &danger )?, r###"
"###, r###"Block quotes (240)"### ); assert_eq!( to_html_with_options( r###"> > foo > "###, &danger )?, r###"
"###, r###"Block quotes (241)"### ); assert_eq!( to_html_with_options( r###"> foo > bar "###, &danger )?, r###"foo
foo
"###, r###"Block quotes (242)"### ); assert_eq!( to_html_with_options( r###"> foo > bar "###, &danger )?, r###"bar
"###, r###"Block quotes (243)"### ); assert_eq!( to_html_with_options( r###"> foo > > bar "###, &danger )?, r###"foo bar
"###, r###"Block quotes (244)"### ); assert_eq!( to_html_with_options( r###"foo > bar "###, &danger )?, r###"foo
bar
foo
"###, r###"Block quotes (245)"### ); assert_eq!( to_html_with_options( r###"> aaa *** > bbb "###, &danger )?, r###"bar
aaa
"###, r###"Block quotes (246)"### ); assert_eq!( to_html_with_options( r###"> bar baz "###, &danger )?, r###"bbb
"###, r###"Block quotes (247)"### ); assert_eq!( to_html_with_options( r###"> bar baz "###, &danger )?, r###"bar baz
bar
baz
"###, r###"Block quotes (248)"### ); assert_eq!( to_html_with_options( r###"> bar > baz "###, &danger )?, r###"bar
baz
"###, r###"Block quotes (249)"### ); assert_eq!( to_html_with_options( r###"> > > foo bar "###, &danger )?, r###""###, r###"Block quotes (250)"### ); assert_eq!( to_html_with_options( r###">>> foo > bar >>baz "###, &danger )?, r###"foo bar
"###, r###"Block quotes (251)"### ); assert_eq!( to_html_with_options( r###"> code > not code "###, &danger )?, r###"foo bar baz
code
"###, r###"Block quotes (252)"### ); assert_eq!( to_html_with_options( r###"A paragraph with two lines. indented code > A block quote. "###, &danger )?, r###"not code
A paragraph with two lines.
indented code
"###, r###"List items (253)"### ); assert_eq!( to_html_with_options( r###"1. A paragraph with two lines. indented code > A block quote. "###, &danger )?, r###"A block quote.
A paragraph with two lines.
indented code
A block quote.
two
"###, r###"List items (255)"### ); assert_eq!( to_html_with_options( r###"- one two "###, &danger )?, r###"one
two
two
"###,
r###"List items (257)"###
);
assert_eq!(
to_html_with_options(
r###" - one
two
"###,
&danger
)?,
r###"one
two
"###, r###"List items (259)"### ); assert_eq!( to_html_with_options( r###">>- one >> > > two "###, &danger )?, r###"
one
two
"###, r###"List items (260)"### ); assert_eq!( to_html_with_options( r###"-one 2.two "###, &danger )?, r###"
- one
two
-one
2.two
"###, r###"List items (261)"### ); assert_eq!( to_html_with_options( r###"- foo bar "###, &danger )?, r###"foo
bar
foo
bar
baz
bam
Foo
bar
baz
1234567890. not ok
"###, r###"List items (266)"### ); assert_eq!( to_html_with_options( r###"0. ok "###, &danger )?, r###"-1. not ok
"###, r###"List items (269)"### ); assert_eq!( to_html_with_options( r###"- foo bar "###, &danger )?, r###"foo
bar
foo
bar
indented code
paragraph
more code
"###,
r###"List items (272)"###
);
assert_eq!(
to_html_with_options(
r###"1. indented code
paragraph
more code
"###,
&danger
)?,
r###"indented code
paragraph
more code
indented code
paragraph
more code
foo
bar
"###, r###"List items (275)"### ); assert_eq!( to_html_with_options( r###"- foo bar "###, &danger )?, r###"bar
"###, r###"List items (276)"### ); assert_eq!( to_html_with_options( r###"- foo bar "###, &danger )?, r###"foo
bar
bar
baz
foo
"###, r###"List items (280)"### ); assert_eq!( to_html_with_options( r###"- foo - - bar "###, &danger )?, r###"foo *
foo 1.
"###, r###"List items (285)"### ); assert_eq!( to_html_with_options( r###" 1. A paragraph with two lines. indented code > A block quote. "###, &danger )?, r###"A paragraph with two lines.
indented code
A block quote.
A paragraph with two lines.
indented code
A block quote.
A paragraph with two lines.
indented code
A block quote.
1. A paragraph
with two lines.
indented code
> A block quote.
"###,
r###"List items (289)"###
);
assert_eq!(
to_html_with_options(
r###" 1. 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 (292)"### ); assert_eq!( to_html_with_options( r###"> 1. > Blockquote > continued here. "###, &danger )?, r###"
Blockquote continued here.
"###, r###"List items (293)"### ); assert_eq!( to_html_with_options( r###"- foo - bar - baz - boo "###, &danger )?, r###"
Blockquote continued here.
Foo
The number of windows in my house is 14. The number of doors is 6.
"###, r###"Lists (304)"### ); assert_eq!( to_html_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
foo
bar
baz
baz
bim
foo
notcode
foo
code
"###,
r###"Lists (309)"###
);
assert_eq!(
to_html_with_options(
r###"- a
- b
- c
- d
- e
- f
- g
"###,
&danger
)?,
r###"a
b
c
a
b
3. c
"###,
r###"Lists (313)"###
);
assert_eq!(
to_html_with_options(
r###"- a
- b
- c
"###,
&danger
)?,
r###"a
b
c
a
c
a
b
c
d
a
b
d
b
b
c
b
b
c
foo
bar
foo
baz
a
d
hi
lo`
foo
foo ` bar
``
``
a
b
foo bar baz
foo
foo bar baz
foo\
bar`
foo`bar
foo `` bar
*foo*
[not a link](/foo
)
<a href="
">`
<http://foo.bar.
baz>`
```foo``
"###, r###"Code spans (347)"### ); assert_eq!( to_html_with_options( r###"`foo "###, &danger )?, r###"`foo
"###, r###"Code spans (348)"### ); assert_eq!( to_html_with_options( r###"`foo``bar`` "###, &danger )?, r###"`foobar
foo bar
"###, r###"Emphasis and strong emphasis (350)"### ); assert_eq!( to_html_with_options( r###"a * foo bar* "###, &danger )?, r###"a * foo bar*
"###, r###"Emphasis and strong emphasis (351)"### ); assert_eq!( to_html_with_options( r###"a*"foo"* "###, &danger )?, r###"a*"foo"*
"###, r###"Emphasis and strong emphasis (352)"### ); assert_eq!( to_html_with_options( r###"* a * "###, &danger )?, r###"* a *
"###, r###"Emphasis and strong emphasis (353)"### ); assert_eq!( to_html_with_options( r###"foo*bar* "###, &danger )?, r###"foobar
"###, r###"Emphasis and strong emphasis (354)"### ); assert_eq!( to_html_with_options( r###"5*6*78 "###, &danger )?, r###"5678
"###, r###"Emphasis and strong emphasis (355)"### ); assert_eq!( to_html_with_options( r###"_foo bar_ "###, &danger )?, r###"foo bar
"###, r###"Emphasis and strong emphasis (356)"### ); assert_eq!( to_html_with_options( r###"_ foo bar_ "###, &danger )?, r###"_ foo bar_
"###, r###"Emphasis and strong emphasis (357)"### ); assert_eq!( to_html_with_options( r###"a_"foo"_ "###, &danger )?, r###"a_"foo"_
"###, r###"Emphasis and strong emphasis (358)"### ); assert_eq!( to_html_with_options( r###"foo_bar_ "###, &danger )?, r###"foo_bar_
"###, r###"Emphasis and strong emphasis (359)"### ); assert_eq!( to_html_with_options( r###"5_6_78 "###, &danger )?, r###"5_6_78
"###, r###"Emphasis and strong emphasis (360)"### ); assert_eq!( to_html_with_options( r###"пристаням_стремятся_ "###, &danger )?, r###"пристаням_стремятся_
"###, r###"Emphasis and strong emphasis (361)"### ); assert_eq!( to_html_with_options( r###"aa_"bb"_cc "###, &danger )?, r###"aa_"bb"_cc
"###, r###"Emphasis and strong emphasis (362)"### ); assert_eq!( to_html_with_options( r###"foo-_(bar)_ "###, &danger )?, r###"foo-(bar)
"###, r###"Emphasis and strong emphasis (363)"### ); assert_eq!( to_html_with_options( r###"_foo* "###, &danger )?, r###"_foo*
"###, r###"Emphasis and strong emphasis (364)"### ); assert_eq!( to_html_with_options( r###"*foo bar * "###, &danger )?, r###"*foo bar *
"###, r###"Emphasis and strong emphasis (365)"### ); assert_eq!( to_html_with_options( r###"*foo bar * "###, &danger )?, r###"*foo bar *
"###, r###"Emphasis and strong emphasis (366)"### ); assert_eq!( to_html_with_options( r###"*(*foo) "###, &danger )?, r###"*(*foo)
"###, r###"Emphasis and strong emphasis (367)"### ); assert_eq!( to_html_with_options( r###"*(*foo*)* "###, &danger )?, r###"(foo)
"###, r###"Emphasis and strong emphasis (368)"### ); assert_eq!( to_html_with_options( r###"*foo*bar "###, &danger )?, r###"foobar
"###, r###"Emphasis and strong emphasis (369)"### ); assert_eq!( to_html_with_options( r###"_foo bar _ "###, &danger )?, r###"_foo bar _
"###, r###"Emphasis and strong emphasis (370)"### ); assert_eq!( to_html_with_options( r###"_(_foo) "###, &danger )?, r###"_(_foo)
"###, r###"Emphasis and strong emphasis (371)"### ); assert_eq!( to_html_with_options( r###"_(_foo_)_ "###, &danger )?, r###"(foo)
"###, r###"Emphasis and strong emphasis (372)"### ); assert_eq!( to_html_with_options( r###"_foo_bar "###, &danger )?, r###"_foo_bar
"###, r###"Emphasis and strong emphasis (373)"### ); assert_eq!( to_html_with_options( r###"_пристаням_стремятся "###, &danger )?, r###"_пристаням_стремятся
"###, r###"Emphasis and strong emphasis (374)"### ); assert_eq!( to_html_with_options( r###"_foo_bar_baz_ "###, &danger )?, r###"foo_bar_baz
"###, r###"Emphasis and strong emphasis (375)"### ); assert_eq!( to_html_with_options( r###"_(bar)_. "###, &danger )?, r###"(bar).
"###, r###"Emphasis and strong emphasis (376)"### ); assert_eq!( to_html_with_options( r###"**foo bar** "###, &danger )?, r###"foo bar
"###, r###"Emphasis and strong emphasis (377)"### ); assert_eq!( to_html_with_options( r###"** foo bar** "###, &danger )?, r###"** foo bar**
"###, r###"Emphasis and strong emphasis (378)"### ); assert_eq!( to_html_with_options( r###"a**"foo"** "###, &danger )?, r###"a**"foo"**
"###, r###"Emphasis and strong emphasis (379)"### ); assert_eq!( to_html_with_options( r###"foo**bar** "###, &danger )?, r###"foobar
"###, r###"Emphasis and strong emphasis (380)"### ); assert_eq!( to_html_with_options( r###"__foo bar__ "###, &danger )?, r###"foo bar
"###, r###"Emphasis and strong emphasis (381)"### ); assert_eq!( to_html_with_options( r###"__ foo bar__ "###, &danger )?, r###"__ foo bar__
"###, r###"Emphasis and strong emphasis (382)"### ); assert_eq!( to_html_with_options( r###"__ foo bar__ "###, &danger )?, r###"__ foo bar__
"###, r###"Emphasis and strong emphasis (383)"### ); assert_eq!( to_html_with_options( r###"a__"foo"__ "###, &danger )?, r###"a__"foo"__
"###, r###"Emphasis and strong emphasis (384)"### ); assert_eq!( to_html_with_options( r###"foo__bar__ "###, &danger )?, r###"foo__bar__
"###, r###"Emphasis and strong emphasis (385)"### ); assert_eq!( to_html_with_options( r###"5__6__78 "###, &danger )?, r###"5__6__78
"###, r###"Emphasis and strong emphasis (386)"### ); assert_eq!( to_html_with_options( r###"пристаням__стремятся__ "###, &danger )?, r###"пристаням__стремятся__
"###, r###"Emphasis and strong emphasis (387)"### ); assert_eq!( to_html_with_options( r###"__foo, __bar__, baz__ "###, &danger )?, r###"foo, bar, baz
"###, r###"Emphasis and strong emphasis (388)"### ); assert_eq!( to_html_with_options( r###"foo-__(bar)__ "###, &danger )?, r###"foo-(bar)
"###, r###"Emphasis and strong emphasis (389)"### ); assert_eq!( to_html_with_options( r###"**foo bar ** "###, &danger )?, r###"**foo bar **
"###, r###"Emphasis and strong emphasis (390)"### ); assert_eq!( to_html_with_options( r###"**(**foo) "###, &danger )?, r###"**(**foo)
"###, r###"Emphasis and strong emphasis (391)"### ); assert_eq!( to_html_with_options( r###"*(**foo**)* "###, &danger )?, r###"(foo)
"###, r###"Emphasis and strong emphasis (392)"### ); assert_eq!( to_html_with_options( r###"**Gomphocarpus (*Gomphocarpus physocarpus*, syn. *Asclepias physocarpa*)** "###, &danger )?, r###"Gomphocarpus (Gomphocarpus physocarpus, syn. Asclepias physocarpa)
"###, r###"Emphasis and strong emphasis (393)"### ); assert_eq!( to_html_with_options( r###"**foo "*bar*" foo** "###, &danger )?, r###"foo "bar" foo
"###, r###"Emphasis and strong emphasis (394)"### ); assert_eq!( to_html_with_options( r###"**foo**bar "###, &danger )?, r###"foobar
"###, r###"Emphasis and strong emphasis (395)"### ); assert_eq!( to_html_with_options( r###"__foo bar __ "###, &danger )?, r###"__foo bar __
"###, r###"Emphasis and strong emphasis (396)"### ); assert_eq!( to_html_with_options( r###"__(__foo) "###, &danger )?, r###"__(__foo)
"###, r###"Emphasis and strong emphasis (397)"### ); assert_eq!( to_html_with_options( r###"_(__foo__)_ "###, &danger )?, r###"(foo)
"###, r###"Emphasis and strong emphasis (398)"### ); assert_eq!( to_html_with_options( r###"__foo__bar "###, &danger )?, r###"__foo__bar
"###, r###"Emphasis and strong emphasis (399)"### ); assert_eq!( to_html_with_options( r###"__пристаням__стремятся "###, &danger )?, r###"__пристаням__стремятся
"###, r###"Emphasis and strong emphasis (400)"### ); assert_eq!( to_html_with_options( r###"__foo__bar__baz__ "###, &danger )?, r###"foo__bar__baz
"###, r###"Emphasis and strong emphasis (401)"### ); assert_eq!( to_html_with_options( r###"__(bar)__. "###, &danger )?, r###"(bar).
"###, r###"Emphasis and strong emphasis (402)"### ); assert_eq!( to_html_with_options( r###"*foo [bar](/url)* "###, &danger )?, r###"foo bar
"###, r###"Emphasis and strong emphasis (403)"### ); assert_eq!( to_html_with_options( r###"*foo bar* "###, &danger )?, r###"foo bar
"###, r###"Emphasis and strong emphasis (404)"### ); assert_eq!( to_html_with_options( r###"_foo __bar__ baz_ "###, &danger )?, r###"foo bar baz
"###, r###"Emphasis and strong emphasis (405)"### ); assert_eq!( to_html_with_options( r###"_foo _bar_ baz_ "###, &danger )?, r###"foo bar baz
"###, r###"Emphasis and strong emphasis (406)"### ); assert_eq!( to_html_with_options( r###"__foo_ bar_ "###, &danger )?, r###"foo bar
"###, r###"Emphasis and strong emphasis (407)"### ); assert_eq!( to_html_with_options( r###"*foo *bar** "###, &danger )?, r###"foo bar
"###, r###"Emphasis and strong emphasis (408)"### ); assert_eq!( to_html_with_options( r###"*foo **bar** baz* "###, &danger )?, r###"foo bar baz
"###, r###"Emphasis and strong emphasis (409)"### ); assert_eq!( to_html_with_options( r###"*foo**bar**baz* "###, &danger )?, r###"foobarbaz
"###, r###"Emphasis and strong emphasis (410)"### ); assert_eq!( to_html_with_options( r###"*foo**bar* "###, &danger )?, r###"foo**bar
"###, r###"Emphasis and strong emphasis (411)"### ); assert_eq!( to_html_with_options( r###"***foo** bar* "###, &danger )?, r###"foo bar
"###, r###"Emphasis and strong emphasis (412)"### ); assert_eq!( to_html_with_options( r###"*foo **bar*** "###, &danger )?, r###"foo bar
"###, r###"Emphasis and strong emphasis (413)"### ); assert_eq!( to_html_with_options( r###"*foo**bar*** "###, &danger )?, r###"foobar
"###, r###"Emphasis and strong emphasis (414)"### ); assert_eq!( to_html_with_options( r###"foo***bar***baz "###, &danger )?, r###"foobarbaz
"###, r###"Emphasis and strong emphasis (415)"### ); assert_eq!( to_html_with_options( r###"foo******bar*********baz "###, &danger )?, r###"foobar***baz
"###, r###"Emphasis and strong emphasis (416)"### ); assert_eq!( to_html_with_options( r###"*foo **bar *baz* bim** bop* "###, &danger )?, r###"foo bar baz bim bop
"###, r###"Emphasis and strong emphasis (417)"### ); assert_eq!( to_html_with_options( r###"*foo [*bar*](/url)* "###, &danger )?, r###"foo bar
"###, r###"Emphasis and strong emphasis (418)"### ); assert_eq!( to_html_with_options( r###"** is not an empty emphasis "###, &danger )?, r###"** is not an empty emphasis
"###, r###"Emphasis and strong emphasis (419)"### ); assert_eq!( to_html_with_options( r###"**** is not an empty strong emphasis "###, &danger )?, r###"**** is not an empty strong emphasis
"###, r###"Emphasis and strong emphasis (420)"### ); assert_eq!( to_html_with_options( r###"**foo [bar](/url)** "###, &danger )?, r###"foo bar
"###, r###"Emphasis and strong emphasis (421)"### ); assert_eq!( to_html_with_options( r###"**foo bar** "###, &danger )?, r###"foo bar
"###, r###"Emphasis and strong emphasis (422)"### ); assert_eq!( to_html_with_options( r###"__foo _bar_ baz__ "###, &danger )?, r###"foo bar baz
"###, r###"Emphasis and strong emphasis (423)"### ); assert_eq!( to_html_with_options( r###"__foo __bar__ baz__ "###, &danger )?, r###"foo bar baz
"###, r###"Emphasis and strong emphasis (424)"### ); assert_eq!( to_html_with_options( r###"____foo__ bar__ "###, &danger )?, r###"foo bar
"###, r###"Emphasis and strong emphasis (425)"### ); assert_eq!( to_html_with_options( r###"**foo **bar**** "###, &danger )?, r###"foo bar
"###, r###"Emphasis and strong emphasis (426)"### ); assert_eq!( to_html_with_options( r###"**foo *bar* baz** "###, &danger )?, r###"foo bar baz
"###, r###"Emphasis and strong emphasis (427)"### ); assert_eq!( to_html_with_options( r###"**foo*bar*baz** "###, &danger )?, r###"foobarbaz
"###, r###"Emphasis and strong emphasis (428)"### ); assert_eq!( to_html_with_options( r###"***foo* bar** "###, &danger )?, r###"foo bar
"###, r###"Emphasis and strong emphasis (429)"### ); assert_eq!( to_html_with_options( r###"**foo *bar*** "###, &danger )?, r###"foo bar
"###, r###"Emphasis and strong emphasis (430)"### ); assert_eq!( to_html_with_options( r###"**foo *bar **baz** bim* bop** "###, &danger )?, r###"foo bar baz bim bop
"###, r###"Emphasis and strong emphasis (431)"### ); assert_eq!( to_html_with_options( r###"**foo [*bar*](/url)** "###, &danger )?, r###"foo bar
"###, r###"Emphasis and strong emphasis (432)"### ); assert_eq!( to_html_with_options( r###"__ is not an empty emphasis "###, &danger )?, r###"__ is not an empty emphasis
"###, r###"Emphasis and strong emphasis (433)"### ); assert_eq!( to_html_with_options( r###"____ is not an empty strong emphasis "###, &danger )?, r###"____ is not an empty strong emphasis
"###, r###"Emphasis and strong emphasis (434)"### ); assert_eq!( to_html_with_options( r###"foo *** "###, &danger )?, r###"foo ***
"###, r###"Emphasis and strong emphasis (435)"### ); assert_eq!( to_html_with_options( r###"foo *\** "###, &danger )?, r###"foo *
"###, r###"Emphasis and strong emphasis (436)"### ); assert_eq!( to_html_with_options( r###"foo *_* "###, &danger )?, r###"foo _
"###, r###"Emphasis and strong emphasis (437)"### ); assert_eq!( to_html_with_options( r###"foo ***** "###, &danger )?, r###"foo *****
"###, r###"Emphasis and strong emphasis (438)"### ); assert_eq!( to_html_with_options( r###"foo **\*** "###, &danger )?, r###"foo *
"###, r###"Emphasis and strong emphasis (439)"### ); assert_eq!( to_html_with_options( r###"foo **_** "###, &danger )?, r###"foo _
"###, r###"Emphasis and strong emphasis (440)"### ); assert_eq!( to_html_with_options( r###"**foo* "###, &danger )?, r###"*foo
"###, r###"Emphasis and strong emphasis (441)"### ); assert_eq!( to_html_with_options( r###"*foo** "###, &danger )?, r###"foo*
"###, r###"Emphasis and strong emphasis (442)"### ); assert_eq!( to_html_with_options( r###"***foo** "###, &danger )?, r###"*foo
"###, r###"Emphasis and strong emphasis (443)"### ); assert_eq!( to_html_with_options( r###"****foo* "###, &danger )?, r###"***foo
"###, r###"Emphasis and strong emphasis (444)"### ); assert_eq!( to_html_with_options( r###"**foo*** "###, &danger )?, r###"foo*
"###, r###"Emphasis and strong emphasis (445)"### ); assert_eq!( to_html_with_options( r###"*foo**** "###, &danger )?, r###"foo***
"###, r###"Emphasis and strong emphasis (446)"### ); assert_eq!( to_html_with_options( r###"foo ___ "###, &danger )?, r###"foo ___
"###, r###"Emphasis and strong emphasis (447)"### ); assert_eq!( to_html_with_options( r###"foo _\__ "###, &danger )?, r###"foo _
"###, r###"Emphasis and strong emphasis (448)"### ); assert_eq!( to_html_with_options( r###"foo _*_ "###, &danger )?, r###"foo *
"###, r###"Emphasis and strong emphasis (449)"### ); assert_eq!( to_html_with_options( r###"foo _____ "###, &danger )?, r###"foo _____
"###, r###"Emphasis and strong emphasis (450)"### ); assert_eq!( to_html_with_options( r###"foo __\___ "###, &danger )?, r###"foo _
"###, r###"Emphasis and strong emphasis (451)"### ); assert_eq!( to_html_with_options( r###"foo __*__ "###, &danger )?, r###"foo *
"###, r###"Emphasis and strong emphasis (452)"### ); assert_eq!( to_html_with_options( r###"__foo_ "###, &danger )?, r###"_foo
"###, r###"Emphasis and strong emphasis (453)"### ); assert_eq!( to_html_with_options( r###"_foo__ "###, &danger )?, r###"foo_
"###, r###"Emphasis and strong emphasis (454)"### ); assert_eq!( to_html_with_options( r###"___foo__ "###, &danger )?, r###"_foo
"###, r###"Emphasis and strong emphasis (455)"### ); assert_eq!( to_html_with_options( r###"____foo_ "###, &danger )?, r###"___foo
"###, r###"Emphasis and strong emphasis (456)"### ); assert_eq!( to_html_with_options( r###"__foo___ "###, &danger )?, r###"foo_
"###, r###"Emphasis and strong emphasis (457)"### ); assert_eq!( to_html_with_options( r###"_foo____ "###, &danger )?, r###"foo___
"###, r###"Emphasis and strong emphasis (458)"### ); assert_eq!( to_html_with_options( r###"**foo** "###, &danger )?, r###"foo
"###, r###"Emphasis and strong emphasis (459)"### ); assert_eq!( to_html_with_options( r###"*_foo_* "###, &danger )?, r###"foo
"###, r###"Emphasis and strong emphasis (460)"### ); assert_eq!( to_html_with_options( r###"__foo__ "###, &danger )?, r###"foo
"###, r###"Emphasis and strong emphasis (461)"### ); assert_eq!( to_html_with_options( r###"_*foo*_ "###, &danger )?, r###"foo
"###, r###"Emphasis and strong emphasis (462)"### ); assert_eq!( to_html_with_options( r###"****foo**** "###, &danger )?, r###"foo
"###, r###"Emphasis and strong emphasis (463)"### ); assert_eq!( to_html_with_options( r###"____foo____ "###, &danger )?, r###"foo
"###, r###"Emphasis and strong emphasis (464)"### ); assert_eq!( to_html_with_options( r###"******foo****** "###, &danger )?, r###"foo
"###, r###"Emphasis and strong emphasis (465)"### ); assert_eq!( to_html_with_options( r###"***foo*** "###, &danger )?, r###"foo
"###, r###"Emphasis and strong emphasis (466)"### ); assert_eq!( to_html_with_options( r###"_____foo_____ "###, &danger )?, r###"foo
"###, r###"Emphasis and strong emphasis (467)"### ); assert_eq!( to_html_with_options( r###"*foo _bar* baz_ "###, &danger )?, r###"foo _bar baz_
"###, r###"Emphasis and strong emphasis (468)"### ); assert_eq!( to_html_with_options( r###"*foo __bar *baz bim__ bam* "###, &danger )?, r###"foo bar *baz bim bam
"###, r###"Emphasis and strong emphasis (469)"### ); assert_eq!( to_html_with_options( r###"**foo **bar baz** "###, &danger )?, r###"**foo bar baz
"###, r###"Emphasis and strong emphasis (470)"### ); assert_eq!( to_html_with_options( r###"*foo *bar baz* "###, &danger )?, r###"*foo bar baz
"###, r###"Emphasis and strong emphasis (471)"### ); assert_eq!( to_html_with_options( r###"*[bar*](/url) "###, &danger )?, r###"*bar*
"###, r###"Emphasis and strong emphasis (472)"### ); assert_eq!( to_html_with_options( r###"_foo [bar_](/url) "###, &danger )?, r###"_foo bar_
"###, r###"Emphasis and strong emphasis (473)"### ); assert_eq!( to_html_with_options( r###"* "###, &danger )?, r###"*
"###, r###"Emphasis and strong emphasis (474)"### ); assert_eq!( to_html_with_options( r###"** "###, &danger )?, r###" "###, r###"Emphasis and strong emphasis (475)"### ); assert_eq!( to_html_with_options( r###"__ "###, &danger )?, r###" "###, r###"Emphasis and strong emphasis (476)"### ); assert_eq!( to_html_with_options( r###"*a `*`* "###, &danger )?, r###"a *
a _
[link](/my uri)
"###, r###"Links (487)"### ); assert_eq!( to_html_with_options( r###"[link]([link](foo bar)
"###, r###"Links (489)"### ); assert_eq!( to_html_with_options( r###"[link]([link](
[link](<foo>)
"###, r###"Links (492)"### ); assert_eq!( to_html_with_options( r###"[a]( [a](c) "###, &danger )?, r###"[a](<b)c [a](<b)c> [a](c)
"###, r###"Links (493)"### ); assert_eq!( to_html_with_options( r###"[link](\(foo\)) "###, &danger )?, r###" "###, r###"Links (494)"### ); assert_eq!( to_html_with_options( r###"[link](foo(and(bar))) "###, &danger )?, r###" "###, r###"Links (495)"### ); assert_eq!( to_html_with_options( r###"[link](foo(and(bar)) "###, &danger )?, r###"[link](foo(and(bar))
"###, r###"Links (496)"### ); assert_eq!( to_html_with_options( r###"[link](foo\(and\(bar\)) "###, &danger )?, r###" "###, r###"Links (497)"### ); assert_eq!( to_html_with_options( r###"[link]([link](/url "title "and" title")
"###, r###"Links (507)"### ); assert_eq!( to_html_with_options( r###"[link](/url 'title "and" title') "###, &danger )?, r###" "###, r###"Links (508)"### ); assert_eq!( to_html_with_options( r###"[link]( /uri "title" ) "###, &danger )?, r###" "###, r###"Links (509)"### ); assert_eq!( to_html_with_options( r###"[link] (/uri) "###, &danger )?, r###"[link] (/uri)
"###, r###"Links (510)"### ); assert_eq!( to_html_with_options( r###"[link [foo [bar]]](/uri) "###, &danger )?, r###" "###, r###"Links (511)"### ); assert_eq!( to_html_with_options( r###"[link] bar](/uri) "###, &danger )?, r###"[link] bar](/uri)
"###, r###"Links (512)"### ); assert_eq!( to_html_with_options( r###"[link [bar](/uri) "###, &danger )?, r###"[link bar
"###, r###"Links (513)"### ); assert_eq!( to_html_with_options( r###"[link \[bar](/uri) "###, &danger )?, r###" "###, r###"Links (514)"### ); assert_eq!( to_html_with_options( r###"[link *foo **bar** `#`*](/uri) "###, &danger )?, r###" "###, r###"Links (515)"### ); assert_eq!( to_html_with_options( r###"[![moon](moon.jpg)](/uri) "###, &danger )?, r###" "###, r###"Links (516)"### ); assert_eq!( to_html_with_options( r###"[foo [bar](/uri)](/uri) "###, &danger )?, r###"[foo bar](/uri)
"###, r###"Links (517)"### ); assert_eq!( to_html_with_options( r###"[foo *[bar [baz](/uri)](/uri)*](/uri) "###, &danger )?, r###"[foo [bar baz](/uri)](/uri)
"###, r###"Links (518)"### ); assert_eq!( to_html_with_options( r###"![[[foo](uri1)](uri2)](uri3) "###, &danger )?, r###" "###, r###"Links (519)"### ); assert_eq!( to_html_with_options( r###"*[foo*](/uri) "###, &danger )?, r###"*foo*
"###, r###"Links (520)"### ); assert_eq!( to_html_with_options( r###"[foo *bar](baz*) "###, &danger )?, r###" "###, r###"Links (521)"### ); assert_eq!( to_html_with_options( r###"*foo [bar* baz] "###, &danger )?, r###"foo [bar baz]
"###, r###"Links (522)"### ); assert_eq!( to_html_with_options( r###"[foo[foo
[foo](/uri)
[foohttp://example.com/?search=](uri)
"###, r###"Links (525)"### ); assert_eq!( to_html_with_options( r###"[foo][bar] [bar]: /url "title" "###, &danger )?, r###" "###, r###"Links (526)"### ); assert_eq!( to_html_with_options( r###"[link [foo [bar]]][ref] [ref]: /uri "###, &danger )?, r###" "###, r###"Links (527)"### ); assert_eq!( to_html_with_options( r###"[link \[bar][ref] [ref]: /uri "###, &danger )?, r###" "###, r###"Links (528)"### ); assert_eq!( to_html_with_options( r###"[link *foo **bar** `#`*][ref] [ref]: /uri "###, &danger )?, r###" "###, r###"Links (529)"### ); assert_eq!( to_html_with_options( r###"[![moon](moon.jpg)][ref] [ref]: /uri "###, &danger )?, r###" "###, r###"Links (530)"### ); assert_eq!( to_html_with_options( r###"[foo [bar](/uri)][ref] [ref]: /uri "###, &danger )?, r###" "###, r###"Links (531)"### ); assert_eq!( to_html_with_options( r###"[foo *bar [baz][ref]*][ref] [ref]: /uri "###, &danger )?, r###" "###, r###"Links (532)"### ); assert_eq!( to_html_with_options( r###"*[foo*][ref] [ref]: /uri "###, &danger )?, r###"*foo*
"###, r###"Links (533)"### ); assert_eq!( to_html_with_options( r###"[foo *bar][ref]* [ref]: /uri "###, &danger )?, r###" "###, r###"Links (534)"### ); assert_eq!( to_html_with_options( r###"[foo[foo
[foo][ref]
[foohttp://example.com/?search=][ref]
"###, r###"Links (537)"### ); assert_eq!( to_html_with_options( r###"[foo][BaR] [bar]: /url "title" "###, &danger )?, r###" "###, r###"Links (538)"### ); assert_eq!( to_html_with_options( r###"[ẞ] [SS]: /url "###, &danger )?, r###" "###, r###"Links (539)"### ); assert_eq!( to_html_with_options( r###"[Foo bar]: /url [Baz][Foo bar] "###, &danger )?, r###" "###, r###"Links (540)"### ); assert_eq!( to_html_with_options( r###"[foo] [bar] [bar]: /url "title" "###, &danger )?, r###"[foo] bar
"###, r###"Links (541)"### ); assert_eq!( to_html_with_options( r###"[foo] [bar] [bar]: /url "title" "###, &danger )?, r###"[foo] bar
"###, r###"Links (542)"### ); assert_eq!( to_html_with_options( r###"[foo]: /url1 [foo]: /url2 [bar][foo] "###, &danger )?, r###" "###, r###"Links (543)"### ); assert_eq!( to_html_with_options( r###"[bar][foo\!] [foo!]: /url "###, &danger )?, r###"[bar][foo!]
"###, r###"Links (544)"### ); assert_eq!( to_html_with_options( r###"[foo][ref[] [ref[]: /uri "###, &danger )?, r###"[foo][ref[]
[ref[]: /uri
"###, r###"Links (545)"### ); assert_eq!( to_html_with_options( r###"[foo][ref[bar]] [ref[bar]]: /uri "###, &danger )?, r###"[foo][ref[bar]]
[ref[bar]]: /uri
"###, r###"Links (546)"### ); assert_eq!( to_html_with_options( r###"[[[foo]]] [[[foo]]]: /url "###, &danger )?, r###"[[[foo]]]
[[[foo]]]: /url
"###, r###"Links (547)"### ); assert_eq!( to_html_with_options( r###"[foo][ref\[] [ref\[]: /uri "###, &danger )?, r###" "###, r###"Links (548)"### ); assert_eq!( to_html_with_options( r###"[bar\\]: /uri [bar\\] "###, &danger )?, r###" "###, r###"Links (549)"### ); assert_eq!( to_html_with_options( r###"[] []: /uri "###, &danger )?, r###"[]
[]: /uri
"###, r###"Links (550)"### ); assert_eq!( to_html_with_options( r###"[ ] [ ]: /uri "###, &danger )?, r###"[ ]
[ ]: /uri
"###, r###"Links (551)"### ); assert_eq!( to_html_with_options( r###"[foo][] [foo]: /url "title" "###, &danger )?, r###" "###, r###"Links (552)"### ); assert_eq!( to_html_with_options( r###"[*foo* bar][] [*foo* bar]: /url "title" "###, &danger )?, r###" "###, r###"Links (553)"### ); assert_eq!( to_html_with_options( r###"[Foo][] [foo]: /url "title" "###, &danger )?, r###" "###, r###"Links (554)"### ); assert_eq!( to_html_with_options( r###"[foo] [] [foo]: /url "title" "###, &danger )?, r###"foo []
"###, r###"Links (555)"### ); assert_eq!( to_html_with_options( r###"[foo] [foo]: /url "title" "###, &danger )?, r###" "###, r###"Links (556)"### ); assert_eq!( to_html_with_options( r###"[*foo* bar] [*foo* bar]: /url "title" "###, &danger )?, r###" "###, r###"Links (557)"### ); assert_eq!( to_html_with_options( r###"[[*foo* bar]] [*foo* bar]: /url "title" "###, &danger )?, r###"[foo bar]
"###, r###"Links (558)"### ); assert_eq!( to_html_with_options( r###"[[bar [foo] [foo]: /url "###, &danger )?, r###"[[bar foo
"###, r###"Links (559)"### ); assert_eq!( to_html_with_options( r###"[Foo] [foo]: /url "title" "###, &danger )?, r###" "###, r###"Links (560)"### ); assert_eq!( to_html_with_options( r###"[foo] bar [foo]: /url "###, &danger )?, r###"foo bar
"###, r###"Links (561)"### ); assert_eq!( to_html_with_options( r###"\[foo] [foo]: /url "title" "###, &danger )?, r###"[foo]
"###, r###"Links (562)"### ); assert_eq!( to_html_with_options( r###"[foo*]: /url *[foo*] "###, &danger )?, r###"*foo*
"###, r###"Links (563)"### ); assert_eq!( to_html_with_options( r###"[foo][bar] [foo]: /url1 [bar]: /url2 "###, &danger )?, r###" "###, r###"Links (564)"### ); assert_eq!( to_html_with_options( r###"[foo][] [foo]: /url1 "###, &danger )?, r###" "###, r###"Links (565)"### ); assert_eq!( to_html_with_options( r###"[foo]() [foo]: /url1 "###, &danger )?, r###" "###, r###"Links (566)"### ); assert_eq!( to_html_with_options( r###"[foo](not a link) [foo]: /url1 "###, &danger )?, r###"foo(not a link)
"###, r###"Links (567)"### ); assert_eq!( to_html_with_options( r###"[foo][bar][baz] [baz]: /url "###, &danger )?, r###"[foo]bar
"###, r###"Links (568)"### ); assert_eq!( to_html_with_options( r###"[foo][bar][baz] [baz]: /url1 [bar]: /url2 "###, &danger )?, r###" "###, r###"Links (569)"### ); assert_eq!( to_html_with_options( r###"[foo][bar][baz] [baz]: /url1 [foo]: /url2 "###, &danger )?, r###"[foo]bar
"###, r###"Links (570)"### ); assert_eq!( to_html_with_options( r###"![foo](/url "title") "###, &danger )?, r###" "###, r###"Images (571)"### ); assert_eq!( to_html_with_options( r###"![foo *bar*] [foo *bar*]: train.jpg "train & tracks" "###, &danger )?, r###" "###, r###"Images (572)"### ); assert_eq!( to_html_with_options( r###"![foo ![bar](/url)](/url2) "###, &danger )?, r###" "###, r###"Images (573)"### ); assert_eq!( to_html_with_options( r###"![foo [bar](/url)](/url2) "###, &danger )?, r###" "###, r###"Images (574)"### ); assert_eq!( to_html_with_options( r###"![foo *bar*][] [foo *bar*]: train.jpg "train & tracks" "###, &danger )?, r###" "###, r###"Images (575)"### ); assert_eq!( to_html_with_options( r###"![foo *bar*][foobar] [FOOBAR]: train.jpg "train & tracks" "###, &danger )?, r###" "###, r###"Images (576)"### ); assert_eq!( to_html_with_options( r###"![foo](train.jpg) "###, &danger )?, r###" "###, r###"Images (577)"### ); assert_eq!( to_html_with_options( r###"My ![foo bar](/path/to/train.jpg "title" ) "###, &danger )?, r###"My
"###, r###"Images (578)"### ); assert_eq!( to_html_with_options( r###"![foo]([]
"###, r###"Images (586)"### ); assert_eq!( to_html_with_options( r###"![foo] [foo]: /url "title" "###, &danger )?, r###" "###, r###"Images (587)"### ); assert_eq!( to_html_with_options( r###"![*foo* bar] [*foo* bar]: /url "title" "###, &danger )?, r###" "###, r###"Images (588)"### ); assert_eq!( to_html_with_options( r###"![[foo]] [[foo]]: /url "title" "###, &danger )?, r###"![[foo]]
[[foo]]: /url "title"
"###, r###"Images (589)"### ); assert_eq!( to_html_with_options( r###"![Foo] [foo]: /url "title" "###, &danger )?, r###" "###, r###"Images (590)"### ); assert_eq!( to_html_with_options( r###"!\[foo] [foo]: /url "title" "###, &danger )?, r###"![foo]
"###, r###"Images (591)"### ); assert_eq!( to_html_with_options( r###"\![foo] [foo]: /url "title" "###, &danger )?, r###"!foo
"###, r###"Images (592)"### ); assert_eq!( to_html_with_options( r###"http://foo.bar.baz/test?q=hello&id=22&boolean
"###, r###"Autolinks (594)"### ); assert_eq!( to_html_with_options( r###"<http://foo.bar/baz bim>
"###, r###"Autolinks (601)"### ); assert_eq!( to_html_with_options( r###"<foo+@bar.example.com>
"###, r###"Autolinks (605)"### ); assert_eq!( to_html_with_options( r###"<> "###, &danger )?, r###"<>
"###, r###"Autolinks (606)"### ); assert_eq!( to_html_with_options( r###"< http://foo.bar > "###, &danger )?, r###"< http://foo.bar >
"###, r###"Autolinks (607)"### ); assert_eq!( to_html_with_options( r###"<m:abc>
"###, r###"Autolinks (608)"### ); assert_eq!( to_html_with_options( r###"<foo.bar.baz>
"###, r###"Autolinks (609)"### ); assert_eq!( to_html_with_options( r###"http://example.com "###, &danger )?, r###"http://example.com
"###, r###"Autolinks (610)"### ); assert_eq!( to_html_with_options( r###"foo@bar.example.com "###, &danger )?, r###"foo@bar.example.com
"###, r###"Autolinks (611)"### ); assert_eq!( to_html_with_options( r###"Foo
<33> <__>
"###, r###"Raw HTML (617)"### ); assert_eq!( to_html_with_options( r###" "###, &danger )?, r###"<a h*#ref="hi">
"###, r###"Raw HTML (618)"### ); assert_eq!( to_html_with_options( r###"<a href="hi'> <a href=hi'> "###, r###"Raw HTML (619)"### ); assert_eq!( to_html_with_options( r###"< a>< foo>< a>< foo><bar/ > <foo bar=baz bim!bop />
"###, r###"Raw HTML (620)"### ); assert_eq!( to_html_with_options( r###" "###, &danger )?, r###"<a href='bar'title=title>
"###, r###"Raw HTML (621)"### ); assert_eq!( to_html_with_options( r###"</a href="foo">
"###, r###"Raw HTML (623)"### ); assert_eq!( to_html_with_options( r###"foo "###, &danger )?, r###"foo
"###, r###"Raw HTML (624)"### ); assert_eq!( to_html_with_options( r###"foo "###, &danger )?, r###"foo <!-- not a comment -- two hyphens -->
"###, r###"Raw HTML (625)"### ); assert_eq!( to_html_with_options( r###"foo foo --> foo "###, &danger )?, r###"foo <!--> foo -->
foo <!-- foo--->
"###, r###"Raw HTML (626)"### ); assert_eq!( to_html_with_options( r###"foo "###, &danger )?, r###"foo
"###, r###"Raw HTML (627)"### ); assert_eq!( to_html_with_options( r###"foo "###, &danger )?, r###"foo
"###, r###"Raw HTML (628)"### ); assert_eq!( to_html_with_options( r###"foo &<]]> "###, &danger )?, r###"foo &<]]>
"###, r###"Raw HTML (629)"### ); assert_eq!( to_html_with_options( r###"foo "###, &danger )?, r###" "###, r###"Raw HTML (630)"### ); assert_eq!( to_html_with_options( r###"foo "###, &danger )?, r###" "###, r###"Raw HTML (631)"### ); assert_eq!( to_html_with_options( r###" "###, &danger )?, r###"<a href=""">
"###, r###"Raw HTML (632)"### ); assert_eq!( to_html_with_options( r###"foo baz "###, &danger )?, r###"foo
baz
foo
baz
foo
baz
foo
bar
foo
bar
foo
bar
foo
bar
code span
code\ span
foo\
"###, r###"Hard line breaks (644)"### ); assert_eq!( to_html_with_options( r###"foo "###, &danger )?, r###"foo
"###, r###"Hard line breaks (645)"### ); assert_eq!( to_html_with_options( r###"### foo\ "###, &danger )?, r###"foo baz
"###, r###"Soft line breaks (648)"### ); assert_eq!( to_html_with_options( r###"foo baz "###, &danger )?, r###"foo baz
"###, r###"Soft line breaks (649)"### ); assert_eq!( to_html_with_options( r###"hello $.;'there "###, &danger )?, r###"hello $.;'there
"###, r###"Textual content (650)"### ); assert_eq!( to_html_with_options( r###"Foo χρῆν "###, &danger )?, r###"Foo χρῆν
"###, r###"Textual content (651)"### ); assert_eq!( to_html_with_options( r###"Multiple spaces "###, &danger )?, r###"Multiple spaces
"###, r###"Textual content (652)"### ); Ok(()) }