@@ -2301,7 +2871,8 @@ Hi
);
assert_eq!(
- micromark_with_options(r###"
+ micromark_with_options(
+ r###"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
<td>
@@ -2326,58 +2899,73 @@ Hi
);
assert_eq!(
- micromark_with_options(r###"[foo]: /url "title"
+ micromark_with_options(
+ r###"[foo]: /url "title"
[foo]
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Link reference definitions (192)"###
);
assert_eq!(
- micromark_with_options(r###" [foo]:
+ micromark_with_options(
+ r###" [foo]:
/url
'the title'
[foo]
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Link reference definitions (193)"###
);
assert_eq!(
- micromark_with_options(r###"[Foo*bar\]]:my_(url) 'title (with parens)'
+ micromark_with_options(
+ r###"[Foo*bar\]]:my_(url) 'title (with parens)'
[Foo*bar\]]
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"Foo*bar]
"###,
r###"Link reference definitions (194)"###
);
assert_eq!(
- micromark_with_options(r###"[Foo bar]:
+ micromark_with_options(
+ r###"[Foo bar]:
'title'
[Foo bar]
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"Foo bar
"###,
r###"Link reference definitions (195)"###
);
assert_eq!(
- micromark_with_options(r###"[foo]: /url '
+ micromark_with_options(
+ r###"[foo]: /url '
title
line1
line2
'
[foo]
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"[foo]: /url 'title
with blank line'
[foo]
@@ -2402,21 +2993,27 @@ with blank line'
);
assert_eq!(
- micromark_with_options(r###"[foo]:
+ micromark_with_options(
+ r###"[foo]:
/url
[foo]
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Link reference definitions (198)"###
);
assert_eq!(
- micromark_with_options(r###"[foo]:
+ micromark_with_options(
+ r###"[foo]:
[foo]
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"[foo]:
[foo]
"###,
@@ -2424,20 +3021,26 @@ with blank line'
);
assert_eq!(
- micromark_with_options(r###"[foo]: <>
+ micromark_with_options(
+ r###"[foo]: <>
[foo]
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Link reference definitions (200)"###
);
assert_eq!(
- micromark_with_options(r###"[foo]: (baz)
+ micromark_with_options(
+ r###"[foo]: (baz)
[foo]
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"[foo]: (baz)
[foo]
"###,
@@ -2445,96 +3048,126 @@ with blank line'
);
assert_eq!(
- micromark_with_options(r###"[foo]: /url\bar\*baz "foo\"bar\baz"
+ micromark_with_options(
+ r###"[foo]: /url\bar\*baz "foo\"bar\baz"
[foo]
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Link reference definitions (202)"###
);
assert_eq!(
- micromark_with_options(r###"[foo]
+ micromark_with_options(
+ r###"[foo]
[foo]: url
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Link reference definitions (203)"###
);
assert_eq!(
- micromark_with_options(r###"[foo]
+ micromark_with_options(
+ r###"[foo]
[foo]: first
[foo]: second
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Link reference definitions (204)"###
);
assert_eq!(
- micromark_with_options(r###"[FOO]: /url
+ micromark_with_options(
+ r###"[FOO]: /url
[Foo]
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"Foo
"###,
r###"Link reference definitions (205)"###
);
assert_eq!(
- micromark_with_options(r###"[ΑΓΩ]: /φου
+ micromark_with_options(
+ r###"[ΑΓΩ]: /φου
[αγω]
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"αγω
"###,
r###"Link reference definitions (206)"###
);
assert_eq!(
- micromark_with_options(r###"[foo]: /url
-"###, DANGER),
+ micromark_with_options(
+ r###"[foo]: /url
+"###,
+ &danger
+ ),
r###""###,
r###"Link reference definitions (207)"###
);
assert_eq!(
- micromark_with_options(r###"[
+ micromark_with_options(
+ r###"[
foo
]: /url
bar
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"bar
"###,
r###"Link reference definitions (208)"###
);
assert_eq!(
- micromark_with_options(r###"[foo]: /url "title" ok
-"###, DANGER),
+ micromark_with_options(
+ r###"[foo]: /url "title" ok
+"###,
+ &danger
+ ),
r###"[foo]: /url "title" ok
"###,
r###"Link reference definitions (209)"###
);
assert_eq!(
- micromark_with_options(r###"[foo]: /url
+ micromark_with_options(
+ r###"[foo]: /url
"title" ok
-"###, DANGER),
+"###,
+ &danger
+ ),
r###""title" ok
"###,
r###"Link reference definitions (210)"###
);
assert_eq!(
- micromark_with_options(r###" [foo]: /url "title"
+ micromark_with_options(
+ r###" [foo]: /url "title"
[foo]
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"[foo]: /url "title"
[foo]
@@ -2543,12 +3176,15 @@ bar
);
assert_eq!(
- micromark_with_options(r###"```
+ micromark_with_options(
+ r###"```
[foo]: /url
```
[foo]
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"[foo]: /url
[foo]
@@ -2557,11 +3193,14 @@ bar
);
assert_eq!(
- micromark_with_options(r###"Foo
+ micromark_with_options(
+ r###"Foo
[bar]: /baz
[bar]
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"Foo
[bar]: /baz
[bar]
@@ -2570,10 +3209,13 @@ bar
);
assert_eq!(
- micromark_with_options(r###"# [Foo]
+ micromark_with_options(
+ r###"# [Foo]
[foo]: /url
> bar
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
bar
@@ -2583,11 +3225,14 @@ bar
);
assert_eq!(
- micromark_with_options(r###"[foo]: /url
+ micromark_with_options(
+ r###"[foo]: /url
bar
===
[foo]
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"bar
foo
"###,
@@ -2595,10 +3240,13 @@ bar
);
assert_eq!(
- micromark_with_options(r###"[foo]: /url
+ micromark_with_options(
+ r###"[foo]: /url
===
[foo]
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"===
foo
"###,
@@ -2606,7 +3254,8 @@ bar
);
assert_eq!(
- micromark_with_options(r###"[foo]: /foo-url "foo"
+ micromark_with_options(
+ r###"[foo]: /foo-url "foo"
[bar]: /bar-url
"bar"
[baz]: /baz-url
@@ -2614,7 +3263,9 @@ bar
[foo],
[bar],
[baz]
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo,
bar,
baz
@@ -2623,10 +3274,13 @@ bar
);
assert_eq!(
- micromark_with_options(r###"[foo]
+ micromark_with_options(
+ r###"[foo]
> [foo]: /url
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
@@ -2635,10 +3289,13 @@ bar
);
assert_eq!(
- micromark_with_options(r###"aaa
+ micromark_with_options(
+ r###"aaa
bbb
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"aaa
bbb
"###,
@@ -2646,12 +3303,15 @@ bbb
);
assert_eq!(
- micromark_with_options(r###"aaa
+ micromark_with_options(
+ r###"aaa
bbb
ccc
ddd
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"aaa
bbb
ccc
@@ -2661,11 +3321,14 @@ ddd
);
assert_eq!(
- micromark_with_options(r###"aaa
+ micromark_with_options(
+ r###"aaa
bbb
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"aaa
bbb
"###,
@@ -2673,9 +3336,12 @@ bbb
);
assert_eq!(
- micromark_with_options(r###" aaa
+ micromark_with_options(
+ r###" aaa
bbb
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"aaa
bbb
"###,
@@ -2683,10 +3349,13 @@ bbb
);
assert_eq!(
- micromark_with_options(r###"aaa
+ micromark_with_options(
+ r###"aaa
bbb
ccc
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"aaa
bbb
ccc
@@ -2695,9 +3364,12 @@ ccc
);
assert_eq!(
- micromark_with_options(r###" aaa
+ micromark_with_options(
+ r###" aaa
bbb
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"aaa
bbb
"###,
@@ -2705,9 +3377,12 @@ bbb
);
assert_eq!(
- micromark_with_options(r###" aaa
+ micromark_with_options(
+ r###" aaa
bbb
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"aaa
bbb
@@ -2716,9 +3391,12 @@ bbb
);
assert_eq!(
- micromark_with_options(r###"aaa
+ micromark_with_options(
+ r###"aaa
bbb
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"aaa
bbb
"###,
@@ -2726,7 +3404,8 @@ bbb
);
assert_eq!(
- micromark_with_options(r###"
+ micromark_with_options(
+ r###"
aaa
@@ -2734,7 +3413,9 @@ aaa
# aaa
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"aaa
aaa
"###,
@@ -2742,10 +3423,13 @@ aaa
);
assert_eq!(
- micromark_with_options(r###"> # Foo
+ micromark_with_options(
+ r###"> # Foo
> bar
> baz
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
Foo
bar
@@ -2756,10 +3440,13 @@ baz
);
assert_eq!(
- micromark_with_options(r###"># Foo
+ micromark_with_options(
+ r###"># Foo
>bar
> baz
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
Foo
bar
@@ -2770,10 +3457,13 @@ baz
);
assert_eq!(
- micromark_with_options(r###" > # Foo
+ micromark_with_options(
+ r###" > # Foo
> bar
> baz
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
Foo
bar
@@ -2784,10 +3474,13 @@ baz
);
assert_eq!(
- micromark_with_options(r###" > # Foo
+ micromark_with_options(
+ r###" > # Foo
> bar
> baz
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"> # Foo
> bar
> baz
@@ -2797,10 +3490,13 @@ baz
);
assert_eq!(
- micromark_with_options(r###"> # Foo
+ micromark_with_options(
+ r###"> # Foo
> bar
baz
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
Foo
bar
@@ -2811,10 +3507,13 @@ baz
);
assert_eq!(
- micromark_with_options(r###"> bar
+ micromark_with_options(
+ r###"> bar
baz
> foo
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
bar
baz
@@ -2825,9 +3524,12 @@ foo
);
assert_eq!(
- micromark_with_options(r###"> foo
+ micromark_with_options(
+ r###"> foo
---
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
foo
@@ -2837,9 +3539,12 @@ foo
);
assert_eq!(
- micromark_with_options(r###"> - foo
+ micromark_with_options(
+ r###"> - foo
- bar
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
- foo
@@ -2853,9 +3558,12 @@ foo
);
assert_eq!(
- micromark_with_options(r###"> foo
+ micromark_with_options(
+ r###"> foo
bar
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
foo
@@ -2867,10 +3575,13 @@ foo
);
assert_eq!(
- micromark_with_options(r###"> ```
+ micromark_with_options(
+ r###"> ```
foo
```
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
@@ -2881,9 +3592,12 @@ foo
);
assert_eq!(
- micromark_with_options(r###"> foo
+ micromark_with_options(
+ r###"> foo
- bar
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
foo
- bar
@@ -2893,8 +3607,11 @@ foo
);
assert_eq!(
- micromark_with_options(r###">
-"###, DANGER),
+ micromark_with_options(
+ r###">
+"###,
+ &danger
+ ),
r###"
"###,
@@ -2902,10 +3619,13 @@ foo
);
assert_eq!(
- micromark_with_options(r###">
+ micromark_with_options(
+ r###">
>
>
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
"###,
@@ -2913,10 +3633,13 @@ foo
);
assert_eq!(
- micromark_with_options(r###">
+ micromark_with_options(
+ r###">
> foo
>
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
foo
@@ -2925,10 +3648,13 @@ foo
);
assert_eq!(
- micromark_with_options(r###"> foo
+ micromark_with_options(
+ r###"> foo
> bar
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
foo
@@ -2940,9 +3666,12 @@ foo
);
assert_eq!(
- micromark_with_options(r###"> foo
+ micromark_with_options(
+ r###"> foo
> bar
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
foo
bar
@@ -2952,10 +3681,13 @@ bar
);
assert_eq!(
- micromark_with_options(r###"> foo
+ micromark_with_options(
+ r###"> foo
>
> bar
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
foo
bar
@@ -2965,9 +3697,12 @@ bar
);
assert_eq!(
- micromark_with_options(r###"foo
+ micromark_with_options(
+ r###"foo
> bar
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
bar
@@ -2977,10 +3712,13 @@ bar
);
assert_eq!(
- micromark_with_options(r###"> aaa
+ micromark_with_options(
+ r###"> aaa
***
> bbb
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
aaa
@@ -2993,9 +3731,12 @@ bar
);
assert_eq!(
- micromark_with_options(r###"> bar
+ micromark_with_options(
+ r###"> bar
baz
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
bar
baz
@@ -3005,10 +3746,13 @@ baz
);
assert_eq!(
- micromark_with_options(r###"> bar
+ micromark_with_options(
+ r###"> bar
baz
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
bar
@@ -3018,10 +3762,13 @@ baz
);
assert_eq!(
- micromark_with_options(r###"> bar
+ micromark_with_options(
+ r###"> bar
>
baz
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
bar
@@ -3031,9 +3778,12 @@ baz
);
assert_eq!(
- micromark_with_options(r###"> > > foo
+ micromark_with_options(
+ r###"> > > foo
bar
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
@@ -3047,10 +3797,13 @@ bar
);
assert_eq!(
- micromark_with_options(r###">>> foo
+ micromark_with_options(
+ r###">>> foo
> bar
>>baz
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
@@ -3065,10 +3818,13 @@ baz
);
assert_eq!(
- micromark_with_options(r###"> code
+ micromark_with_options(
+ r###"> code
> not code
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
code
@@ -3081,13 +3837,16 @@ baz
);
assert_eq!(
- micromark_with_options(r###"A paragraph
+ micromark_with_options(
+ r###"A paragraph
with two lines.
indented code
> A block quote.
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"A paragraph
with two lines.
indented code
@@ -3100,13 +3859,16 @@ with two lines.
);
assert_eq!(
- micromark_with_options(r###"1. A paragraph
+ micromark_with_options(
+ r###"1. A paragraph
with two lines.
indented code
> A block quote.
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
-
A paragraph
@@ -3123,10 +3885,13 @@ with two lines.
);
assert_eq!(
- micromark_with_options(r###"- one
+ micromark_with_options(
+ r###"- one
two
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
@@ -3136,10 +3901,13 @@ with two lines.
);
assert_eq!(
- micromark_with_options(r###"- one
+ micromark_with_options(
+ r###"- one
two
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
-
one
@@ -3151,10 +3919,13 @@ with two lines.
);
assert_eq!(
- micromark_with_options(r###" - one
+ micromark_with_options(
+ r###" - one
two
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
@@ -3165,10 +3936,13 @@ with two lines.
);
assert_eq!(
- micromark_with_options(r###" - one
+ micromark_with_options(
+ r###" - one
two
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
-
one
@@ -3180,10 +3954,13 @@ with two lines.
);
assert_eq!(
- micromark_with_options(r###" > > 1. one
+ micromark_with_options(
+ r###" > > 1. one
>>
>> two
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
@@ -3199,10 +3976,13 @@ with two lines.
);
assert_eq!(
- micromark_with_options(r###">>- one
+ micromark_with_options(
+ r###">>- one
>>
> > two
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
@@ -3216,10 +3996,13 @@ with two lines.
);
assert_eq!(
- micromark_with_options(r###"-one
+ micromark_with_options(
+ r###"-one
2.two
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"-one
2.two
"###,
@@ -3227,11 +4010,14 @@ with two lines.
);
assert_eq!(
- micromark_with_options(r###"- foo
+ micromark_with_options(
+ r###"- foo
bar
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
-
foo
@@ -3243,7 +4029,8 @@ with two lines.
);
assert_eq!(
- micromark_with_options(r###"1. foo
+ micromark_with_options(
+ r###"1. foo
```
bar
@@ -3252,7 +4039,9 @@ with two lines.
baz
> bam
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
-
foo
@@ -3269,13 +4058,16 @@ with two lines.
);
assert_eq!(
- micromark_with_options(r###"- Foo
+ micromark_with_options(
+ r###"- Foo
bar
baz
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
-
Foo
@@ -3291,8 +4083,11 @@ baz
);
assert_eq!(
- micromark_with_options(r###"123456789. ok
-"###, DANGER),
+ micromark_with_options(
+ r###"123456789. ok
+"###,
+ &danger
+ ),
r###"
- ok
@@ -3301,16 +4096,22 @@ baz
);
assert_eq!(
- micromark_with_options(r###"1234567890. not ok
-"###, DANGER),
+ micromark_with_options(
+ r###"1234567890. not ok
+"###,
+ &danger
+ ),
r###"1234567890. not ok
"###,
r###"List items (266)"###
);
assert_eq!(
- micromark_with_options(r###"0. ok
-"###, DANGER),
+ micromark_with_options(
+ r###"0. ok
+"###,
+ &danger
+ ),
r###"
- ok
@@ -3319,8 +4120,11 @@ baz
);
assert_eq!(
- micromark_with_options(r###"003. ok
-"###, DANGER),
+ micromark_with_options(
+ r###"003. ok
+"###,
+ &danger
+ ),
r###"
- ok
@@ -3329,18 +4133,24 @@ baz
);
assert_eq!(
- micromark_with_options(r###"-1. not ok
-"###, DANGER),
+ micromark_with_options(
+ r###"-1. not ok
+"###,
+ &danger
+ ),
r###"-1. not ok
"###,
r###"List items (269)"###
);
assert_eq!(
- micromark_with_options(r###"- foo
+ micromark_with_options(
+ r###"- foo
bar
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
-
foo
@@ -3353,10 +4163,13 @@ baz
);
assert_eq!(
- micromark_with_options(r###" 10. foo
+ micromark_with_options(
+ r###" 10. foo
bar
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
-
foo
@@ -3369,12 +4182,15 @@ baz
);
assert_eq!(
- micromark_with_options(r###" indented code
+ micromark_with_options(
+ r###" indented code
paragraph
more code
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"indented code
paragraph
@@ -3385,12 +4201,15 @@ paragraph
);
assert_eq!(
- micromark_with_options(r###"1. indented code
+ micromark_with_options(
+ r###"1. indented code
paragraph
more code
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
-
indented code
@@ -3405,12 +4224,15 @@ paragraph
);
assert_eq!(
- micromark_with_options(r###"1. indented code
+ micromark_with_options(
+ r###"1. indented code
paragraph
more code
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
-
indented code
@@ -3425,10 +4247,13 @@ paragraph
);
assert_eq!(
- micromark_with_options(r###" foo
+ micromark_with_options(
+ r###" foo
bar
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
bar
"###,
@@ -3436,10 +4261,13 @@ bar
);
assert_eq!(
- micromark_with_options(r###"- foo
+ micromark_with_options(
+ r###"- foo
bar
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
@@ -3449,10 +4277,13 @@ bar
);
assert_eq!(
- micromark_with_options(r###"- foo
+ micromark_with_options(
+ r###"- foo
bar
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
-
foo
@@ -3464,7 +4295,8 @@ bar
);
assert_eq!(
- micromark_with_options(r###"-
+ micromark_with_options(
+ r###"-
foo
-
```
@@ -3472,7 +4304,9 @@ bar
```
-
baz
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
- foo
-
@@ -3489,9 +4323,12 @@ bar
);
assert_eq!(
- micromark_with_options(r###"-
+ micromark_with_options(
+ r###"-
foo
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
@@ -3500,10 +4337,13 @@ bar
);
assert_eq!(
- micromark_with_options(r###"-
+ micromark_with_options(
+ r###"-
foo
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
@@ -3513,10 +4353,13 @@ bar
);
assert_eq!(
- micromark_with_options(r###"- foo
+ micromark_with_options(
+ r###"- foo
-
- bar
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
- foo
@@ -3527,10 +4370,13 @@ bar
);
assert_eq!(
- micromark_with_options(r###"- foo
+ micromark_with_options(
+ r###"- foo
-
- bar
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
- foo
@@ -3541,10 +4387,13 @@ bar
);
assert_eq!(
- micromark_with_options(r###"1. foo
+ micromark_with_options(
+ r###"1. foo
2.
3. bar
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
- foo
@@ -3555,8 +4404,11 @@ bar
);
assert_eq!(
- micromark_with_options(r###"*
-"###, DANGER),
+ micromark_with_options(
+ r###"*
+"###,
+ &danger
+ ),
r###"
@@ -3565,12 +4417,15 @@ bar
);
assert_eq!(
- micromark_with_options(r###"foo
+ micromark_with_options(
+ r###"foo
*
foo
1.
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
*
foo
@@ -3580,13 +4435,16 @@ foo
);
assert_eq!(
- micromark_with_options(r###" 1. A paragraph
+ micromark_with_options(
+ r###" 1. A paragraph
with two lines.
indented code
> A block quote.
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
-
A paragraph
@@ -3603,13 +4461,16 @@ with two lines.
);
assert_eq!(
- micromark_with_options(r###" 1. A paragraph
+ micromark_with_options(
+ r###" 1. A paragraph
with two lines.
indented code
> A block quote.
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
-
A paragraph
@@ -3626,13 +4487,16 @@ with two lines.
);
assert_eq!(
- micromark_with_options(r###" 1. A paragraph
+ micromark_with_options(
+ r###" 1. A paragraph
with two lines.
indented code
> A block quote.
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
-
A paragraph
@@ -3649,13 +4513,16 @@ with two lines.
);
assert_eq!(
- micromark_with_options(r###" 1. A paragraph
+ micromark_with_options(
+ r###" 1. A paragraph
with two lines.
indented code
> A block quote.
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"1. A paragraph
with two lines.
@@ -3668,13 +4535,16 @@ with two lines.
);
assert_eq!(
- micromark_with_options(r###" 1. A paragraph
+ micromark_with_options(
+ r###" 1. A paragraph
with two lines.
indented code
> A block quote.
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
-
A paragraph
@@ -3691,9 +4561,12 @@ with two lines.
);
assert_eq!(
- micromark_with_options(r###" 1. A paragraph
+ micromark_with_options(
+ r###" 1. A paragraph
with two lines.
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
- A paragraph
with two lines.
@@ -3703,9 +4576,12 @@ with two lines.
);
assert_eq!(
- micromark_with_options(r###"> 1. > Blockquote
+ micromark_with_options(
+ r###"> 1. > Blockquote
continued here.
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
-
@@ -3721,9 +4597,12 @@ continued here.
);
assert_eq!(
- micromark_with_options(r###"> 1. > Blockquote
+ micromark_with_options(
+ r###"> 1. > Blockquote
> continued here.
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
-
@@ -3739,11 +4618,14 @@ continued here.
);
assert_eq!(
- micromark_with_options(r###"- foo
+ micromark_with_options(
+ r###"- foo
- bar
- baz
- boo
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
);
assert_eq!(
- micromark_with_options(r###"- foo
+ micromark_with_options(
+ r###"- foo
- bar
- baz
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
-
foo
@@ -3950,13 +4868,16 @@ baz
);
assert_eq!(
- micromark_with_options(r###"- foo
+ micromark_with_options(
+ r###"- foo
- bar
- baz
bim
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
- foo
@@ -3976,14 +4897,17 @@ baz
);
assert_eq!(
- micromark_with_options(r###"- foo
+ micromark_with_options(
+ r###"- foo
- bar
- baz
- bim
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
- foo
- bar
@@ -3998,7 +4922,8 @@ baz
);
assert_eq!(
- micromark_with_options(r###"- foo
+ micromark_with_options(
+ r###"- foo
notcode
@@ -4007,7 +4932,9 @@ baz
code
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
-
foo
@@ -4025,14 +4952,17 @@ baz
);
assert_eq!(
- micromark_with_options(r###"- a
+ micromark_with_options(
+ r###"- a
- b
- c
- d
- e
- f
- g
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
- a
- b
@@ -4047,12 +4977,15 @@ baz
);
assert_eq!(
- micromark_with_options(r###"1. a
+ micromark_with_options(
+ r###"1. a
2. b
3. c
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
-
a
@@ -4069,12 +5002,15 @@ baz
);
assert_eq!(
- micromark_with_options(r###"- a
+ micromark_with_options(
+ r###"- a
- b
- c
- d
- e
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
- a
- b
@@ -4087,12 +5023,15 @@ baz
);
assert_eq!(
- micromark_with_options(r###"1. a
+ micromark_with_options(
+ r###"1. a
2. b
3. c
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
-
a
@@ -4108,11 +5047,14 @@ baz
);
assert_eq!(
- micromark_with_options(r###"- a
+ micromark_with_options(
+ r###"- a
- b
- c
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
-
a
@@ -4129,11 +5071,14 @@ baz
);
assert_eq!(
- micromark_with_options(r###"* a
+ micromark_with_options(
+ r###"* a
*
* c
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
-
a
@@ -4148,12 +5093,15 @@ baz
);
assert_eq!(
- micromark_with_options(r###"- a
+ micromark_with_options(
+ r###"- a
- b
c
- d
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
-
a
@@ -4171,12 +5119,15 @@ baz
);
assert_eq!(
- micromark_with_options(r###"- a
+ micromark_with_options(
+ r###"- a
- b
[ref]: /url
- d
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
-
a
@@ -4193,14 +5144,17 @@ baz
);
assert_eq!(
- micromark_with_options(r###"- a
+ micromark_with_options(
+ r###"- a
- ```
b
```
- c
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
- a
-
@@ -4216,12 +5170,15 @@ baz
);
assert_eq!(
- micromark_with_options(r###"- a
+ micromark_with_options(
+ r###"- a
- b
c
- d
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
- a
@@ -4238,11 +5195,14 @@ baz
);
assert_eq!(
- micromark_with_options(r###"* a
+ micromark_with_options(
+ r###"* a
> b
>
* c
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
- a
@@ -4256,13 +5216,16 @@ baz
);
assert_eq!(
- micromark_with_options(r###"- a
+ micromark_with_options(
+ r###"- a
> b
```
c
```
- d
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
- a
@@ -4278,8 +5241,11 @@ baz
);
assert_eq!(
- micromark_with_options(r###"- a
-"###, DANGER),
+ micromark_with_options(
+ r###"- a
+"###,
+ &danger
+ ),
r###"
@@ -4288,9 +5254,12 @@ baz
);
assert_eq!(
- micromark_with_options(r###"- a
+ micromark_with_options(
+ r###"- a
- b
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
- a
@@ -4303,12 +5272,15 @@ baz
);
assert_eq!(
- micromark_with_options(r###"1. ```
+ micromark_with_options(
+ r###"1. ```
foo
```
bar
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
-
foo
@@ -4321,11 +5293,14 @@ baz
);
assert_eq!(
- micromark_with_options(r###"* foo
+ micromark_with_options(
+ r###"* foo
* bar
baz
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
-
foo
@@ -4340,14 +5315,17 @@ baz
);
assert_eq!(
- micromark_with_options(r###"- a
+ micromark_with_options(
+ r###"- a
- b
- c
- d
- e
- f
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
-
a
@@ -4369,65 +5347,89 @@ baz
);
assert_eq!(
- micromark_with_options(r###"`hi`lo`
-"###, DANGER),
+ micromark_with_options(
+ r###"`hi`lo`
+"###,
+ &danger
+ ),
r###"hi lo`
"###,
r###"Inlines (327)"###
);
assert_eq!(
- micromark_with_options(r###"`foo`
-"###, DANGER),
+ micromark_with_options(
+ r###"`foo`
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Code spans (328)"###
);
assert_eq!(
- micromark_with_options(r###"`` foo ` bar ``
-"###, DANGER),
+ micromark_with_options(
+ r###"`` foo ` bar ``
+"###,
+ &danger
+ ),
r###"foo ` bar
"###,
r###"Code spans (329)"###
);
assert_eq!(
- micromark_with_options(r###"` `` `
-"###, DANGER),
+ micromark_with_options(
+ r###"` `` `
+"###,
+ &danger
+ ),
r###"``
"###,
r###"Code spans (330)"###
);
assert_eq!(
- micromark_with_options(r###"` `` `
-"###, DANGER),
+ micromark_with_options(
+ r###"` `` `
+"###,
+ &danger
+ ),
r###" ``
"###,
r###"Code spans (331)"###
);
assert_eq!(
- micromark_with_options(r###"` a`
-"###, DANGER),
+ micromark_with_options(
+ r###"` a`
+"###,
+ &danger
+ ),
r###" a
"###,
r###"Code spans (332)"###
);
assert_eq!(
- micromark_with_options(r###"` b `
-"###, DANGER),
+ micromark_with_options(
+ r###"` b `
+"###,
+ &danger
+ ),
r###" b
"###,
r###"Code spans (333)"###
);
assert_eq!(
- micromark_with_options(r###"` `
+ micromark_with_options(
+ r###"` `
` `
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
"###,
@@ -4435,264 +5437,360 @@ baz
);
assert_eq!(
- micromark_with_options(r###"``
+ micromark_with_options(
+ r###"``
foo
bar
baz
``
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo bar baz
"###,
r###"Code spans (335)"###
);
assert_eq!(
- micromark_with_options(r###"``
+ micromark_with_options(
+ r###"``
foo
``
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Code spans (336)"###
);
assert_eq!(
- micromark_with_options(r###"`foo bar
+ micromark_with_options(
+ r###"`foo bar
baz`
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo bar baz
"###,
r###"Code spans (337)"###
);
assert_eq!(
- micromark_with_options(r###"`foo\`bar`
-"###, DANGER),
+ micromark_with_options(
+ r###"`foo\`bar`
+"###,
+ &danger
+ ),
r###"foo\ bar`
"###,
r###"Code spans (338)"###
);
assert_eq!(
- micromark_with_options(r###"``foo`bar``
-"###, DANGER),
+ micromark_with_options(
+ r###"``foo`bar``
+"###,
+ &danger
+ ),
r###"foo`bar
"###,
r###"Code spans (339)"###
);
assert_eq!(
- micromark_with_options(r###"` foo `` bar `
-"###, DANGER),
+ micromark_with_options(
+ r###"` foo `` bar `
+"###,
+ &danger
+ ),
r###"foo `` bar
"###,
r###"Code spans (340)"###
);
assert_eq!(
- micromark_with_options(r###"*foo`*`
-"###, DANGER),
+ micromark_with_options(
+ r###"*foo`*`
+"###,
+ &danger
+ ),
r###"*foo*
"###,
r###"Code spans (341)"###
);
assert_eq!(
- micromark_with_options(r###"[not a `link](/foo`)
-"###, DANGER),
+ micromark_with_options(
+ r###"[not a `link](/foo`)
+"###,
+ &danger
+ ),
r###"[not a link](/foo )
"###,
r###"Code spans (342)"###
);
assert_eq!(
- micromark_with_options(r###"``
-"###, DANGER),
+ micromark_with_options(
+ r###"``
+"###,
+ &danger
+ ),
r###"<a href=" ">`
"###,
r###"Code spans (343)"###
);
assert_eq!(
- micromark_with_options(r###"`
-"###, DANGER),
+ micromark_with_options(
+ r###"`
+"###,
+ &danger
+ ),
r###"`
"###,
r###"Code spans (344)"###
);
assert_eq!(
- micromark_with_options(r###"``
-"###, DANGER),
+ micromark_with_options(
+ r###"``
+"###,
+ &danger
+ ),
r###"<http://foo.bar. baz>`
"###,
r###"Code spans (345)"###
);
assert_eq!(
- micromark_with_options(r###"`
-"###, DANGER),
+ micromark_with_options(
+ r###"`
+"###,
+ &danger
+ ),
r###"http://foo.bar.`baz`
"###,
r###"Code spans (346)"###
);
assert_eq!(
- micromark_with_options(r###"```foo``
-"###, DANGER),
+ micromark_with_options(
+ r###"```foo``
+"###,
+ &danger
+ ),
r###"```foo``
"###,
r###"Code spans (347)"###
);
assert_eq!(
- micromark_with_options(r###"`foo
-"###, DANGER),
+ micromark_with_options(
+ r###"`foo
+"###,
+ &danger
+ ),
r###"`foo
"###,
r###"Code spans (348)"###
);
assert_eq!(
- micromark_with_options(r###"`foo``bar``
-"###, DANGER),
+ micromark_with_options(
+ r###"`foo``bar``
+"###,
+ &danger
+ ),
r###"`foobar
"###,
r###"Code spans (349)"###
);
assert_eq!(
- micromark_with_options(r###"*foo bar*
-"###, DANGER),
+ micromark_with_options(
+ r###"*foo bar*
+"###,
+ &danger
+ ),
r###"foo bar
"###,
r###"Emphasis and strong emphasis (350)"###
);
assert_eq!(
- micromark_with_options(r###"a * foo bar*
-"###, DANGER),
+ micromark_with_options(
+ r###"a * foo bar*
+"###,
+ &danger
+ ),
r###"a * foo bar*
"###,
r###"Emphasis and strong emphasis (351)"###
);
assert_eq!(
- micromark_with_options(r###"a*"foo"*
-"###, DANGER),
+ micromark_with_options(
+ r###"a*"foo"*
+"###,
+ &danger
+ ),
r###"a*"foo"*
"###,
r###"Emphasis and strong emphasis (352)"###
);
assert_eq!(
- micromark_with_options(r###"* a *
-"###, DANGER),
+ micromark_with_options(
+ r###"* a *
+"###,
+ &danger
+ ),
r###"* a *
"###,
r###"Emphasis and strong emphasis (353)"###
);
assert_eq!(
- micromark_with_options(r###"foo*bar*
-"###, DANGER),
+ micromark_with_options(
+ r###"foo*bar*
+"###,
+ &danger
+ ),
r###"foobar
"###,
r###"Emphasis and strong emphasis (354)"###
);
assert_eq!(
- micromark_with_options(r###"5*6*78
-"###, DANGER),
+ micromark_with_options(
+ r###"5*6*78
+"###,
+ &danger
+ ),
r###"5678
"###,
r###"Emphasis and strong emphasis (355)"###
);
assert_eq!(
- micromark_with_options(r###"_foo bar_
-"###, DANGER),
+ micromark_with_options(
+ r###"_foo bar_
+"###,
+ &danger
+ ),
r###"foo bar
"###,
r###"Emphasis and strong emphasis (356)"###
);
assert_eq!(
- micromark_with_options(r###"_ foo bar_
-"###, DANGER),
+ micromark_with_options(
+ r###"_ foo bar_
+"###,
+ &danger
+ ),
r###"_ foo bar_
"###,
r###"Emphasis and strong emphasis (357)"###
);
assert_eq!(
- micromark_with_options(r###"a_"foo"_
-"###, DANGER),
+ micromark_with_options(
+ r###"a_"foo"_
+"###,
+ &danger
+ ),
r###"a_"foo"_
"###,
r###"Emphasis and strong emphasis (358)"###
);
assert_eq!(
- micromark_with_options(r###"foo_bar_
-"###, DANGER),
+ micromark_with_options(
+ r###"foo_bar_
+"###,
+ &danger
+ ),
r###"foo_bar_
"###,
r###"Emphasis and strong emphasis (359)"###
);
assert_eq!(
- micromark_with_options(r###"5_6_78
-"###, DANGER),
+ micromark_with_options(
+ r###"5_6_78
+"###,
+ &danger
+ ),
r###"5_6_78
"###,
r###"Emphasis and strong emphasis (360)"###
);
assert_eq!(
- micromark_with_options(r###"пристаням_стремятся_
-"###, DANGER),
+ micromark_with_options(
+ r###"пристаням_стремятся_
+"###,
+ &danger
+ ),
r###"пристаням_стремятся_
"###,
r###"Emphasis and strong emphasis (361)"###
);
assert_eq!(
- micromark_with_options(r###"aa_"bb"_cc
-"###, DANGER),
+ micromark_with_options(
+ r###"aa_"bb"_cc
+"###,
+ &danger
+ ),
r###"aa_"bb"_cc
"###,
r###"Emphasis and strong emphasis (362)"###
);
assert_eq!(
- micromark_with_options(r###"foo-_(bar)_
-"###, DANGER),
+ micromark_with_options(
+ r###"foo-_(bar)_
+"###,
+ &danger
+ ),
r###"foo-(bar)
"###,
r###"Emphasis and strong emphasis (363)"###
);
assert_eq!(
- micromark_with_options(r###"_foo*
-"###, DANGER),
+ micromark_with_options(
+ r###"_foo*
+"###,
+ &danger
+ ),
r###"_foo*
"###,
r###"Emphasis and strong emphasis (364)"###
);
assert_eq!(
- micromark_with_options(r###"*foo bar *
-"###, DANGER),
+ micromark_with_options(
+ r###"*foo bar *
+"###,
+ &danger
+ ),
r###"*foo bar *
"###,
r###"Emphasis and strong emphasis (365)"###
);
assert_eq!(
- micromark_with_options(r###"*foo bar
+ micromark_with_options(
+ r###"*foo bar
*
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"*foo bar
*
"###,
@@ -4700,137 +5798,188 @@ baz`
);
assert_eq!(
- micromark_with_options(r###"*(*foo)
-"###, DANGER),
+ micromark_with_options(
+ r###"*(*foo)
+"###,
+ &danger
+ ),
r###"*(*foo)
"###,
r###"Emphasis and strong emphasis (367)"###
);
assert_eq!(
- micromark_with_options(r###"*(*foo*)*
-"###, DANGER),
+ micromark_with_options(
+ r###"*(*foo*)*
+"###,
+ &danger
+ ),
r###"(foo)
"###,
r###"Emphasis and strong emphasis (368)"###
);
assert_eq!(
- micromark_with_options(r###"*foo*bar
-"###, DANGER),
+ micromark_with_options(
+ r###"*foo*bar
+"###,
+ &danger
+ ),
r###"foobar
"###,
r###"Emphasis and strong emphasis (369)"###
);
assert_eq!(
- micromark_with_options(r###"_foo bar _
-"###, DANGER),
+ micromark_with_options(
+ r###"_foo bar _
+"###,
+ &danger
+ ),
r###"_foo bar _
"###,
r###"Emphasis and strong emphasis (370)"###
);
assert_eq!(
- micromark_with_options(r###"_(_foo)
-"###, DANGER),
+ micromark_with_options(
+ r###"_(_foo)
+"###,
+ &danger
+ ),
r###"_(_foo)
"###,
r###"Emphasis and strong emphasis (371)"###
);
assert_eq!(
- micromark_with_options(r###"_(_foo_)_
-"###, DANGER),
+ micromark_with_options(
+ r###"_(_foo_)_
+"###,
+ &danger
+ ),
r###"(foo)
"###,
r###"Emphasis and strong emphasis (372)"###
);
assert_eq!(
- micromark_with_options(r###"_foo_bar
-"###, DANGER),
+ micromark_with_options(
+ r###"_foo_bar
+"###,
+ &danger
+ ),
r###"_foo_bar
"###,
r###"Emphasis and strong emphasis (373)"###
);
assert_eq!(
- micromark_with_options(r###"_пристаням_стремятся
-"###, DANGER),
+ micromark_with_options(
+ r###"_пристаням_стремятся
+"###,
+ &danger
+ ),
r###"_пристаням_стремятся
"###,
r###"Emphasis and strong emphasis (374)"###
);
assert_eq!(
- micromark_with_options(r###"_foo_bar_baz_
-"###, DANGER),
+ micromark_with_options(
+ r###"_foo_bar_baz_
+"###,
+ &danger
+ ),
r###"foo_bar_baz
"###,
r###"Emphasis and strong emphasis (375)"###
);
assert_eq!(
- micromark_with_options(r###"_(bar)_.
-"###, DANGER),
+ micromark_with_options(
+ r###"_(bar)_.
+"###,
+ &danger
+ ),
r###"(bar).
"###,
r###"Emphasis and strong emphasis (376)"###
);
assert_eq!(
- micromark_with_options(r###"**foo bar**
-"###, DANGER),
+ micromark_with_options(
+ r###"**foo bar**
+"###,
+ &danger
+ ),
r###"foo bar
"###,
r###"Emphasis and strong emphasis (377)"###
);
assert_eq!(
- micromark_with_options(r###"** foo bar**
-"###, DANGER),
+ micromark_with_options(
+ r###"** foo bar**
+"###,
+ &danger
+ ),
r###"** foo bar**
"###,
r###"Emphasis and strong emphasis (378)"###
);
assert_eq!(
- micromark_with_options(r###"a**"foo"**
-"###, DANGER),
+ micromark_with_options(
+ r###"a**"foo"**
+"###,
+ &danger
+ ),
r###"a**"foo"**
"###,
r###"Emphasis and strong emphasis (379)"###
);
assert_eq!(
- micromark_with_options(r###"foo**bar**
-"###, DANGER),
+ micromark_with_options(
+ r###"foo**bar**
+"###,
+ &danger
+ ),
r###"foobar
"###,
r###"Emphasis and strong emphasis (380)"###
);
assert_eq!(
- micromark_with_options(r###"__foo bar__
-"###, DANGER),
+ 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),
+ micromark_with_options(
+ r###"__ foo bar__
+"###,
+ &danger
+ ),
r###"__ foo bar__
"###,
r###"Emphasis and strong emphasis (382)"###
);
assert_eq!(
- micromark_with_options(r###"__
+ micromark_with_options(
+ r###"__
foo bar__
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"__
foo bar__
"###,
@@ -4838,81 +5987,111 @@ foo bar__
);
assert_eq!(
- micromark_with_options(r###"a__"foo"__
-"###, DANGER),
+ micromark_with_options(
+ r###"a__"foo"__
+"###,
+ &danger
+ ),
r###"a__"foo"__
"###,
r###"Emphasis and strong emphasis (384)"###
);
assert_eq!(
- micromark_with_options(r###"foo__bar__
-"###, DANGER),
+ micromark_with_options(
+ r###"foo__bar__
+"###,
+ &danger
+ ),
r###"foo__bar__
"###,
r###"Emphasis and strong emphasis (385)"###
);
assert_eq!(
- micromark_with_options(r###"5__6__78
-"###, DANGER),
+ micromark_with_options(
+ r###"5__6__78
+"###,
+ &danger
+ ),
r###"5__6__78
"###,
r###"Emphasis and strong emphasis (386)"###
);
assert_eq!(
- micromark_with_options(r###"пристаням__стремятся__
-"###, DANGER),
+ micromark_with_options(
+ r###"пристаням__стремятся__
+"###,
+ &danger
+ ),
r###"пристаням__стремятся__
"###,
r###"Emphasis and strong emphasis (387)"###
);
assert_eq!(
- micromark_with_options(r###"__foo, __bar__, baz__
-"###, DANGER),
+ micromark_with_options(
+ r###"__foo, __bar__, baz__
+"###,
+ &danger
+ ),
r###"foo, bar, baz
"###,
r###"Emphasis and strong emphasis (388)"###
);
assert_eq!(
- micromark_with_options(r###"foo-__(bar)__
-"###, DANGER),
+ micromark_with_options(
+ r###"foo-__(bar)__
+"###,
+ &danger
+ ),
r###"foo-(bar)
"###,
r###"Emphasis and strong emphasis (389)"###
);
assert_eq!(
- micromark_with_options(r###"**foo bar **
-"###, DANGER),
+ micromark_with_options(
+ r###"**foo bar **
+"###,
+ &danger
+ ),
r###"**foo bar **
"###,
r###"Emphasis and strong emphasis (390)"###
);
assert_eq!(
- micromark_with_options(r###"**(**foo)
-"###, DANGER),
+ micromark_with_options(
+ r###"**(**foo)
+"###,
+ &danger
+ ),
r###"**(**foo)
"###,
r###"Emphasis and strong emphasis (391)"###
);
assert_eq!(
- micromark_with_options(r###"*(**foo**)*
-"###, DANGER),
+ micromark_with_options(
+ r###"*(**foo**)*
+"###,
+ &danger
+ ),
r###"(foo)
"###,
r###"Emphasis and strong emphasis (392)"###
);
assert_eq!(
- micromark_with_options(r###"**Gomphocarpus (*Gomphocarpus physocarpus*, syn.
+ micromark_with_options(
+ r###"**Gomphocarpus (*Gomphocarpus physocarpus*, syn.
*Asclepias physocarpa*)**
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"Gomphocarpus (Gomphocarpus physocarpus, syn.
Asclepias physocarpa)
"###,
@@ -4920,89 +6099,122 @@ foo bar__
);
assert_eq!(
- micromark_with_options(r###"**foo "*bar*" foo**
-"###, DANGER),
+ micromark_with_options(
+ r###"**foo "*bar*" foo**
+"###,
+ &danger
+ ),
r###"foo "bar" foo
"###,
r###"Emphasis and strong emphasis (394)"###
);
assert_eq!(
- micromark_with_options(r###"**foo**bar
-"###, DANGER),
+ micromark_with_options(
+ r###"**foo**bar
+"###,
+ &danger
+ ),
r###"foobar
"###,
r###"Emphasis and strong emphasis (395)"###
);
assert_eq!(
- micromark_with_options(r###"__foo bar __
-"###, DANGER),
+ micromark_with_options(
+ r###"__foo bar __
+"###,
+ &danger
+ ),
r###"__foo bar __
"###,
r###"Emphasis and strong emphasis (396)"###
);
assert_eq!(
- micromark_with_options(r###"__(__foo)
-"###, DANGER),
+ micromark_with_options(
+ r###"__(__foo)
+"###,
+ &danger
+ ),
r###"__(__foo)
"###,
r###"Emphasis and strong emphasis (397)"###
);
assert_eq!(
- micromark_with_options(r###"_(__foo__)_
-"###, DANGER),
+ micromark_with_options(
+ r###"_(__foo__)_
+"###,
+ &danger
+ ),
r###"(foo)
"###,
r###"Emphasis and strong emphasis (398)"###
);
assert_eq!(
- micromark_with_options(r###"__foo__bar
-"###, DANGER),
+ micromark_with_options(
+ r###"__foo__bar
+"###,
+ &danger
+ ),
r###"__foo__bar
"###,
r###"Emphasis and strong emphasis (399)"###
);
assert_eq!(
- micromark_with_options(r###"__пристаням__стремятся
-"###, DANGER),
+ micromark_with_options(
+ r###"__пристаням__стремятся
+"###,
+ &danger
+ ),
r###"__пристаням__стремятся
"###,
r###"Emphasis and strong emphasis (400)"###
);
assert_eq!(
- micromark_with_options(r###"__foo__bar__baz__
-"###, DANGER),
+ micromark_with_options(
+ r###"__foo__bar__baz__
+"###,
+ &danger
+ ),
r###"foo__bar__baz
"###,
r###"Emphasis and strong emphasis (401)"###
);
assert_eq!(
- micromark_with_options(r###"__(bar)__.
-"###, DANGER),
+ micromark_with_options(
+ r###"__(bar)__.
+"###,
+ &danger
+ ),
r###"(bar).
"###,
r###"Emphasis and strong emphasis (402)"###
);
assert_eq!(
- micromark_with_options(r###"*foo [bar](/url)*
-"###, DANGER),
+ micromark_with_options(
+ r###"*foo [bar](/url)*
+"###,
+ &danger
+ ),
r###"foo bar
"###,
r###"Emphasis and strong emphasis (403)"###
);
assert_eq!(
- micromark_with_options(r###"*foo
+ micromark_with_options(
+ r###"*foo
bar*
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
bar
"###,
@@ -5010,145 +6222,199 @@ bar
);
assert_eq!(
- micromark_with_options(r###"_foo __bar__ baz_
-"###, DANGER),
+ 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_ baz_
-"###, DANGER),
+ micromark_with_options(
+ r###"_foo _bar_ baz_
+"###,
+ &danger
+ ),
r###"foo bar baz
"###,
r###"Emphasis and strong emphasis (406)"###
);
assert_eq!(
- micromark_with_options(r###"__foo_ bar_
-"###, DANGER),
+ micromark_with_options(
+ r###"__foo_ bar_
+"###,
+ &danger
+ ),
r###"foo bar
"###,
r###"Emphasis and strong emphasis (407)"###
);
assert_eq!(
- micromark_with_options(r###"*foo *bar**
-"###, DANGER),
+ micromark_with_options(
+ r###"*foo *bar**
+"###,
+ &danger
+ ),
r###"foo bar
"###,
r###"Emphasis and strong emphasis (408)"###
);
assert_eq!(
- micromark_with_options(r###"*foo **bar** baz*
-"###, DANGER),
+ micromark_with_options(
+ r###"*foo **bar** baz*
+"###,
+ &danger
+ ),
r###"foo bar baz
"###,
r###"Emphasis and strong emphasis (409)"###
);
assert_eq!(
- micromark_with_options(r###"*foo**bar**baz*
-"###, DANGER),
+ micromark_with_options(
+ r###"*foo**bar**baz*
+"###,
+ &danger
+ ),
r###"foobarbaz
"###,
r###"Emphasis and strong emphasis (410)"###
);
assert_eq!(
- micromark_with_options(r###"*foo**bar*
-"###, DANGER),
+ 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),
+ 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),
+ micromark_with_options(
+ r###"*foo **bar***
+"###,
+ &danger
+ ),
r###"foo bar
"###,
r###"Emphasis and strong emphasis (413)"###
);
assert_eq!(
- micromark_with_options(r###"*foo**bar***
-"###, DANGER),
+ micromark_with_options(
+ r###"*foo**bar***
+"###,
+ &danger
+ ),
r###"foobar
"###,
r###"Emphasis and strong emphasis (414)"###
);
assert_eq!(
- micromark_with_options(r###"foo***bar***baz
-"###, DANGER),
+ micromark_with_options(
+ r###"foo***bar***baz
+"###,
+ &danger
+ ),
r###"foobarbaz
"###,
r###"Emphasis and strong emphasis (415)"###
);
assert_eq!(
- micromark_with_options(r###"foo******bar*********baz
-"###, DANGER),
+ micromark_with_options(
+ r###"foo******bar*********baz
+"###,
+ &danger
+ ),
r###"foobar***baz
"###,
r###"Emphasis and strong emphasis (416)"###
);
assert_eq!(
- micromark_with_options(r###"*foo **bar *baz* bim** bop*
-"###, DANGER),
+ micromark_with_options(
+ r###"*foo **bar *baz* bim** bop*
+"###,
+ &danger
+ ),
r###"foo bar baz bim bop
"###,
r###"Emphasis and strong emphasis (417)"###
);
assert_eq!(
- micromark_with_options(r###"*foo [*bar*](/url)*
-"###, DANGER),
+ micromark_with_options(
+ r###"*foo [*bar*](/url)*
+"###,
+ &danger
+ ),
r###"foo bar
"###,
r###"Emphasis and strong emphasis (418)"###
);
assert_eq!(
- micromark_with_options(r###"** is not an empty emphasis
-"###, DANGER),
+ micromark_with_options(
+ r###"** is not an empty emphasis
+"###,
+ &danger
+ ),
r###"** is not an empty emphasis
"###,
r###"Emphasis and strong emphasis (419)"###
);
assert_eq!(
- micromark_with_options(r###"**** is not an empty strong emphasis
-"###, DANGER),
+ micromark_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!(
- micromark_with_options(r###"**foo [bar](/url)**
-"###, DANGER),
+ micromark_with_options(
+ r###"**foo [bar](/url)**
+"###,
+ &danger
+ ),
r###"foo bar
"###,
r###"Emphasis and strong emphasis (421)"###
);
assert_eq!(
- micromark_with_options(r###"**foo
+ micromark_with_options(
+ r###"**foo
bar**
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
bar
"###,
@@ -5156,73 +6422,100 @@ bar
);
assert_eq!(
- micromark_with_options(r###"__foo _bar_ baz__
-"###, DANGER),
+ 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__ baz__
-"###, DANGER),
+ micromark_with_options(
+ r###"__foo __bar__ baz__
+"###,
+ &danger
+ ),
r###"foo bar baz
"###,
r###"Emphasis and strong emphasis (424)"###
);
assert_eq!(
- micromark_with_options(r###"____foo__ bar__
-"###, DANGER),
+ micromark_with_options(
+ r###"____foo__ bar__
+"###,
+ &danger
+ ),
r###"foo bar
"###,
r###"Emphasis and strong emphasis (425)"###
);
assert_eq!(
- micromark_with_options(r###"**foo **bar****
-"###, DANGER),
+ micromark_with_options(
+ r###"**foo **bar****
+"###,
+ &danger
+ ),
r###"foo bar
"###,
r###"Emphasis and strong emphasis (426)"###
);
assert_eq!(
- micromark_with_options(r###"**foo *bar* baz**
-"###, DANGER),
+ micromark_with_options(
+ r###"**foo *bar* baz**
+"###,
+ &danger
+ ),
r###"foo bar baz
"###,
r###"Emphasis and strong emphasis (427)"###
);
assert_eq!(
- micromark_with_options(r###"**foo*bar*baz**
-"###, DANGER),
+ micromark_with_options(
+ r###"**foo*bar*baz**
+"###,
+ &danger
+ ),
r###"foobarbaz
"###,
r###"Emphasis and strong emphasis (428)"###
);
assert_eq!(
- micromark_with_options(r###"***foo* bar**
-"###, DANGER),
+ micromark_with_options(
+ r###"***foo* bar**
+"###,
+ &danger
+ ),
r###"foo bar
"###,
r###"Emphasis and strong emphasis (429)"###
);
assert_eq!(
- micromark_with_options(r###"**foo *bar***
-"###, DANGER),
+ micromark_with_options(
+ r###"**foo *bar***
+"###,
+ &danger
+ ),
r###"foo bar
"###,
r###"Emphasis and strong emphasis (430)"###
);
assert_eq!(
- micromark_with_options(r###"**foo *bar **baz**
+ micromark_with_options(
+ r###"**foo *bar **baz**
bim* bop**
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo bar baz
bim bop
"###,
@@ -5230,465 +6523,639 @@ bim bop
);
assert_eq!(
- micromark_with_options(r###"**foo [*bar*](/url)**
-"###, DANGER),
+ micromark_with_options(
+ r###"**foo [*bar*](/url)**
+"###,
+ &danger
+ ),
r###"foo bar
"###,
r###"Emphasis and strong emphasis (432)"###
);
assert_eq!(
- micromark_with_options(r###"__ is not an empty emphasis
-"###, DANGER),
+ micromark_with_options(
+ r###"__ is not an empty emphasis
+"###,
+ &danger
+ ),
r###"__ is not an empty emphasis
"###,
r###"Emphasis and strong emphasis (433)"###
);
assert_eq!(
- micromark_with_options(r###"____ is not an empty strong emphasis
-"###, DANGER),
+ micromark_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!(
- micromark_with_options(r###"foo ***
-"###, DANGER),
+ micromark_with_options(
+ r###"foo ***
+"###,
+ &danger
+ ),
r###"foo ***
"###,
r###"Emphasis and strong emphasis (435)"###
);
assert_eq!(
- micromark_with_options(r###"foo *\**
-"###, DANGER),
+ micromark_with_options(
+ r###"foo *\**
+"###,
+ &danger
+ ),
r###"foo *
"###,
r###"Emphasis and strong emphasis (436)"###
);
assert_eq!(
- micromark_with_options(r###"foo *_*
-"###, DANGER),
+ micromark_with_options(
+ r###"foo *_*
+"###,
+ &danger
+ ),
r###"foo _
"###,
r###"Emphasis and strong emphasis (437)"###
);
assert_eq!(
- micromark_with_options(r###"foo *****
-"###, DANGER),
+ micromark_with_options(
+ r###"foo *****
+"###,
+ &danger
+ ),
r###"foo *****
"###,
r###"Emphasis and strong emphasis (438)"###
);
assert_eq!(
- micromark_with_options(r###"foo **\***
-"###, DANGER),
+ micromark_with_options(
+ r###"foo **\***
+"###,
+ &danger
+ ),
r###"foo *
"###,
r###"Emphasis and strong emphasis (439)"###
);
assert_eq!(
- micromark_with_options(r###"foo **_**
-"###, DANGER),
+ micromark_with_options(
+ r###"foo **_**
+"###,
+ &danger
+ ),
r###"foo _
"###,
r###"Emphasis and strong emphasis (440)"###
);
assert_eq!(
- micromark_with_options(r###"**foo*
-"###, DANGER),
+ micromark_with_options(
+ r###"**foo*
+"###,
+ &danger
+ ),
r###"*foo
"###,
r###"Emphasis and strong emphasis (441)"###
);
assert_eq!(
- micromark_with_options(r###"*foo**
-"###, DANGER),
+ micromark_with_options(
+ r###"*foo**
+"###,
+ &danger
+ ),
r###"foo*
"###,
r###"Emphasis and strong emphasis (442)"###
);
assert_eq!(
- micromark_with_options(r###"***foo**
-"###, DANGER),
+ micromark_with_options(
+ r###"***foo**
+"###,
+ &danger
+ ),
r###"*foo
"###,
r###"Emphasis and strong emphasis (443)"###
);
assert_eq!(
- micromark_with_options(r###"****foo*
-"###, DANGER),
+ micromark_with_options(
+ r###"****foo*
+"###,
+ &danger
+ ),
r###"***foo
"###,
r###"Emphasis and strong emphasis (444)"###
);
assert_eq!(
- micromark_with_options(r###"**foo***
-"###, DANGER),
+ micromark_with_options(
+ r###"**foo***
+"###,
+ &danger
+ ),
r###"foo*
"###,
r###"Emphasis and strong emphasis (445)"###
);
assert_eq!(
- micromark_with_options(r###"*foo****
-"###, DANGER),
+ micromark_with_options(
+ r###"*foo****
+"###,
+ &danger
+ ),
r###"foo***
"###,
r###"Emphasis and strong emphasis (446)"###
);
assert_eq!(
- micromark_with_options(r###"foo ___
-"###, DANGER),
+ micromark_with_options(
+ r###"foo ___
+"###,
+ &danger
+ ),
r###"foo ___
"###,
r###"Emphasis and strong emphasis (447)"###
);
assert_eq!(
- micromark_with_options(r###"foo _\__
-"###, DANGER),
+ micromark_with_options(
+ r###"foo _\__
+"###,
+ &danger
+ ),
r###"foo _
"###,
r###"Emphasis and strong emphasis (448)"###
);
assert_eq!(
- micromark_with_options(r###"foo _*_
-"###, DANGER),
+ micromark_with_options(
+ r###"foo _*_
+"###,
+ &danger
+ ),
r###"foo *
"###,
r###"Emphasis and strong emphasis (449)"###
);
assert_eq!(
- micromark_with_options(r###"foo _____
-"###, DANGER),
+ micromark_with_options(
+ r###"foo _____
+"###,
+ &danger
+ ),
r###"foo _____
"###,
r###"Emphasis and strong emphasis (450)"###
);
assert_eq!(
- micromark_with_options(r###"foo __\___
-"###, DANGER),
+ micromark_with_options(
+ r###"foo __\___
+"###,
+ &danger
+ ),
r###"foo _
"###,
r###"Emphasis and strong emphasis (451)"###
);
assert_eq!(
- micromark_with_options(r###"foo __*__
-"###, DANGER),
+ micromark_with_options(
+ r###"foo __*__
+"###,
+ &danger
+ ),
r###"foo *
"###,
r###"Emphasis and strong emphasis (452)"###
);
assert_eq!(
- micromark_with_options(r###"__foo_
-"###, DANGER),
+ micromark_with_options(
+ r###"__foo_
+"###,
+ &danger
+ ),
r###"_foo
"###,
r###"Emphasis and strong emphasis (453)"###
);
assert_eq!(
- micromark_with_options(r###"_foo__
-"###, DANGER),
+ micromark_with_options(
+ r###"_foo__
+"###,
+ &danger
+ ),
r###"foo_
"###,
r###"Emphasis and strong emphasis (454)"###
);
assert_eq!(
- micromark_with_options(r###"___foo__
-"###, DANGER),
+ micromark_with_options(
+ r###"___foo__
+"###,
+ &danger
+ ),
r###"_foo
"###,
r###"Emphasis and strong emphasis (455)"###
);
assert_eq!(
- micromark_with_options(r###"____foo_
-"###, DANGER),
+ micromark_with_options(
+ r###"____foo_
+"###,
+ &danger
+ ),
r###"___foo
"###,
r###"Emphasis and strong emphasis (456)"###
);
assert_eq!(
- micromark_with_options(r###"__foo___
-"###, DANGER),
+ micromark_with_options(
+ r###"__foo___
+"###,
+ &danger
+ ),
r###"foo_
"###,
r###"Emphasis and strong emphasis (457)"###
);
assert_eq!(
- micromark_with_options(r###"_foo____
-"###, DANGER),
+ micromark_with_options(
+ r###"_foo____
+"###,
+ &danger
+ ),
r###"foo___
"###,
r###"Emphasis and strong emphasis (458)"###
);
assert_eq!(
- micromark_with_options(r###"**foo**
-"###, DANGER),
+ micromark_with_options(
+ r###"**foo**
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Emphasis and strong emphasis (459)"###
);
assert_eq!(
- micromark_with_options(r###"*_foo_*
-"###, DANGER),
+ micromark_with_options(
+ r###"*_foo_*
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Emphasis and strong emphasis (460)"###
);
assert_eq!(
- micromark_with_options(r###"__foo__
-"###, DANGER),
+ micromark_with_options(
+ r###"__foo__
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Emphasis and strong emphasis (461)"###
);
assert_eq!(
- micromark_with_options(r###"_*foo*_
-"###, DANGER),
+ micromark_with_options(
+ r###"_*foo*_
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Emphasis and strong emphasis (462)"###
);
assert_eq!(
- micromark_with_options(r###"****foo****
-"###, DANGER),
+ micromark_with_options(
+ r###"****foo****
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Emphasis and strong emphasis (463)"###
);
assert_eq!(
- micromark_with_options(r###"____foo____
-"###, DANGER),
+ micromark_with_options(
+ r###"____foo____
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Emphasis and strong emphasis (464)"###
);
assert_eq!(
- micromark_with_options(r###"******foo******
-"###, DANGER),
+ micromark_with_options(
+ r###"******foo******
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Emphasis and strong emphasis (465)"###
);
assert_eq!(
- micromark_with_options(r###"***foo***
-"###, DANGER),
+ micromark_with_options(
+ r###"***foo***
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Emphasis and strong emphasis (466)"###
);
assert_eq!(
- micromark_with_options(r###"_____foo_____
-"###, DANGER),
+ micromark_with_options(
+ r###"_____foo_____
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Emphasis and strong emphasis (467)"###
);
assert_eq!(
- micromark_with_options(r###"*foo _bar* baz_
-"###, DANGER),
+ micromark_with_options(
+ r###"*foo _bar* baz_
+"###,
+ &danger
+ ),
r###"foo _bar baz_
"###,
r###"Emphasis and strong emphasis (468)"###
);
assert_eq!(
- micromark_with_options(r###"*foo __bar *baz bim__ bam*
-"###, DANGER),
+ micromark_with_options(
+ r###"*foo __bar *baz bim__ bam*
+"###,
+ &danger
+ ),
r###"foo bar *baz bim bam
"###,
r###"Emphasis and strong emphasis (469)"###
);
assert_eq!(
- micromark_with_options(r###"**foo **bar baz**
-"###, DANGER),
+ micromark_with_options(
+ r###"**foo **bar baz**
+"###,
+ &danger
+ ),
r###"**foo bar baz
"###,
r###"Emphasis and strong emphasis (470)"###
);
assert_eq!(
- micromark_with_options(r###"*foo *bar baz*
-"###, DANGER),
+ micromark_with_options(
+ r###"*foo *bar baz*
+"###,
+ &danger
+ ),
r###"*foo bar baz
"###,
r###"Emphasis and strong emphasis (471)"###
);
assert_eq!(
- micromark_with_options(r###"*[bar*](/url)
-"###, DANGER),
+ micromark_with_options(
+ r###"*[bar*](/url)
+"###,
+ &danger
+ ),
r###"*bar*
"###,
r###"Emphasis and strong emphasis (472)"###
);
assert_eq!(
- micromark_with_options(r###"_foo [bar_](/url)
-"###, DANGER),
+ micromark_with_options(
+ r###"_foo [bar_](/url)
+"###,
+ &danger
+ ),
r###"_foo bar_
"###,
r###"Emphasis and strong emphasis (473)"###
);
assert_eq!(
- micromark_with_options(r###"*
-"###, DANGER),
+ micromark_with_options(
+ r###"*
+"###,
+ &danger
+ ),
r###"*![*](foo)
"###,
r###"Emphasis and strong emphasis (474)"###
);
assert_eq!(
- micromark_with_options(r###"**
-"###, DANGER),
+ micromark_with_options(
+ r###"**
+"###,
+ &danger
+ ),
r###"**
"###,
r###"Emphasis and strong emphasis (475)"###
);
assert_eq!(
- micromark_with_options(r###"__
-"###, DANGER),
+ micromark_with_options(
+ r###"__
+"###,
+ &danger
+ ),
r###"__
"###,
r###"Emphasis and strong emphasis (476)"###
);
assert_eq!(
- micromark_with_options(r###"*a `*`*
-"###, DANGER),
+ micromark_with_options(
+ r###"*a `*`*
+"###,
+ &danger
+ ),
r###"a *
"###,
r###"Emphasis and strong emphasis (477)"###
);
assert_eq!(
- micromark_with_options(r###"_a `_`_
-"###, DANGER),
+ micromark_with_options(
+ r###"_a `_`_
+"###,
+ &danger
+ ),
r###"a _
"###,
r###"Emphasis and strong emphasis (478)"###
);
assert_eq!(
- micromark_with_options(r###"**a
-"###, DANGER),
+ micromark_with_options(
+ r###"**a
+"###,
+ &danger
+ ),
r###"**ahttp://foo.bar/?q=**
"###,
r###"Emphasis and strong emphasis (479)"###
);
assert_eq!(
- micromark_with_options(r###"__a
-"###, DANGER),
+ micromark_with_options(
+ r###"__a
+"###,
+ &danger
+ ),
r###"__ahttp://foo.bar/?q=__
"###,
r###"Emphasis and strong emphasis (480)"###
);
assert_eq!(
- micromark_with_options(r###"[link](/uri "title")
-"###, DANGER),
+ micromark_with_options(
+ r###"[link](/uri "title")
+"###,
+ &danger
+ ),
r###"link
"###,
r###"Links (481)"###
);
assert_eq!(
- micromark_with_options(r###"[link](/uri)
-"###, DANGER),
+ micromark_with_options(
+ r###"[link](/uri)
+"###,
+ &danger
+ ),
r###"link
"###,
r###"Links (482)"###
);
assert_eq!(
- micromark_with_options(r###"[](./target.md)
-"###, DANGER),
+ micromark_with_options(
+ r###"[](./target.md)
+"###,
+ &danger
+ ),
r###"
"###,
r###"Links (483)"###
);
assert_eq!(
- micromark_with_options(r###"[link]()
-"###, DANGER),
+ micromark_with_options(
+ r###"[link]()
+"###,
+ &danger
+ ),
r###"link
"###,
r###"Links (484)"###
);
assert_eq!(
- micromark_with_options(r###"[link](<>)
-"###, DANGER),
+ micromark_with_options(
+ r###"[link](<>)
+"###,
+ &danger
+ ),
r###"link
"###,
r###"Links (485)"###
);
assert_eq!(
- micromark_with_options(r###"[]()
-"###, DANGER),
+ micromark_with_options(
+ r###"[]()
+"###,
+ &danger
+ ),
r###"
"###,
r###"Links (486)"###
);
assert_eq!(
- micromark_with_options(r###"[link](/my uri)
-"###, DANGER),
+ micromark_with_options(
+ r###"[link](/my uri)
+"###,
+ &danger
+ ),
r###"[link](/my uri)
"###,
r###"Links (487)"###
);
assert_eq!(
- micromark_with_options(r###"[link](
)
-"###, DANGER),
+ micromark_with_options(
+ r###"[link]()
+"###,
+ &danger
+ ),
r###"link
"###,
r###"Links (488)"###
);
assert_eq!(
- micromark_with_options(r###"[link](foo
+ micromark_with_options(
+ r###"[link](foo
bar)
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"[link](foo
bar)
"###,
@@ -5696,9 +7163,12 @@ bar)
);
assert_eq!(
- micromark_with_options(r###"[link]()
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"[link]()
"###,
@@ -5706,26 +7176,35 @@ bar>)
);
assert_eq!(
- micromark_with_options(r###"[a]()
-"###, DANGER),
+ micromark_with_options(
+ r###"[a]()
+"###,
+ &danger
+ ),
r###"a
"###,
r###"Links (491)"###
);
assert_eq!(
- micromark_with_options(r###"[link]()
-"###, DANGER),
+ micromark_with_options(
+ r###"[link]()
+"###,
+ &danger
+ ),
r###"[link](<foo>)
"###,
r###"Links (492)"###
);
assert_eq!(
- micromark_with_options(r###"[a](
[a](c)
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"[a](<b)c
[a](<b)c>
[a](c)
@@ -5734,60 +7213,81 @@ bar>)
);
assert_eq!(
- micromark_with_options(r###"[link](\(foo\))
-"###, DANGER),
+ micromark_with_options(
+ r###"[link](\(foo\))
+"###,
+ &danger
+ ),
r###"link
"###,
r###"Links (494)"###
);
assert_eq!(
- micromark_with_options(r###"[link](foo(and(bar)))
-"###, DANGER),
+ micromark_with_options(
+ r###"[link](foo(and(bar)))
+"###,
+ &danger
+ ),
r###"link
"###,
r###"Links (495)"###
);
assert_eq!(
- micromark_with_options(r###"[link](foo(and(bar))
-"###, DANGER),
+ micromark_with_options(
+ r###"[link](foo(and(bar))
+"###,
+ &danger
+ ),
r###"[link](foo(and(bar))
"###,
r###"Links (496)"###
);
assert_eq!(
- micromark_with_options(r###"[link](foo\(and\(bar\))
-"###, DANGER),
+ micromark_with_options(
+ r###"[link](foo\(and\(bar\))
+"###,
+ &danger
+ ),
r###"link
"###,
r###"Links (497)"###
);
assert_eq!(
- micromark_with_options(r###"[link]()
-"###, DANGER),
+ micromark_with_options(
+ r###"[link]()
+"###,
+ &danger
+ ),
r###"link
"###,
r###"Links (498)"###
);
assert_eq!(
- micromark_with_options(r###"[link](foo\)\:)
-"###, DANGER),
+ micromark_with_options(
+ r###"[link](foo\)\:)
+"###,
+ &danger
+ ),
r###"link
"###,
r###"Links (499)"###
);
assert_eq!(
- micromark_with_options(r###"[link](#fragment)
+ micromark_with_options(
+ r###"[link](#fragment)
[link](http://example.com#fragment)
[link](http://example.com?foo=3#frag)
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"link
link
link
@@ -5796,34 +7296,46 @@ bar>)
);
assert_eq!(
- micromark_with_options(r###"[link](foo\bar)
-"###, DANGER),
+ micromark_with_options(
+ r###"[link](foo\bar)
+"###,
+ &danger
+ ),
r###"link
"###,
r###"Links (501)"###
);
assert_eq!(
- micromark_with_options(r###"[link](foo%20bä)
-"###, DANGER),
+ micromark_with_options(
+ r###"[link](foo%20bä)
+"###,
+ &danger
+ ),
r###"link
"###,
r###"Links (502)"###
);
assert_eq!(
- micromark_with_options(r###"[link]("title")
-"###, DANGER),
+ micromark_with_options(
+ r###"[link]("title")
+"###,
+ &danger
+ ),
r###"link
"###,
r###"Links (503)"###
);
assert_eq!(
- micromark_with_options(r###"[link](/url "title")
+ micromark_with_options(
+ r###"[link](/url "title")
[link](/url 'title')
[link](/url (title))
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"link
link
link
@@ -5832,341 +7344,455 @@ bar>)
);
assert_eq!(
- micromark_with_options(r###"[link](/url "title \""")
-"###, DANGER),
+ micromark_with_options(
+ r###"[link](/url "title \""")
+"###,
+ &danger
+ ),
r###"link
"###,
r###"Links (505)"###
);
assert_eq!(
- micromark_with_options(r###"[link](/url "title")
-"###, DANGER),
+ micromark_with_options(
+ r###"[link](/url "title")
+"###,
+ &danger
+ ),
r###"link
"###,
r###"Links (506)"###
);
assert_eq!(
- micromark_with_options(r###"[link](/url "title "and" title")
-"###, DANGER),
+ micromark_with_options(
+ r###"[link](/url "title "and" title")
+"###,
+ &danger
+ ),
r###"[link](/url "title "and" title")
"###,
r###"Links (507)"###
);
assert_eq!(
- micromark_with_options(r###"[link](/url 'title "and" title')
-"###, DANGER),
+ micromark_with_options(
+ r###"[link](/url 'title "and" title')
+"###,
+ &danger
+ ),
r###"link
"###,
r###"Links (508)"###
);
assert_eq!(
- micromark_with_options(r###"[link]( /uri
+ micromark_with_options(
+ r###"[link]( /uri
"title" )
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"link
"###,
r###"Links (509)"###
);
assert_eq!(
- micromark_with_options(r###"[link] (/uri)
-"###, DANGER),
+ micromark_with_options(
+ r###"[link] (/uri)
+"###,
+ &danger
+ ),
r###"[link] (/uri)
"###,
r###"Links (510)"###
);
assert_eq!(
- micromark_with_options(r###"[link [foo [bar]]](/uri)
-"###, DANGER),
+ micromark_with_options(
+ r###"[link [foo [bar]]](/uri)
+"###,
+ &danger
+ ),
r###"link [foo [bar]]
"###,
r###"Links (511)"###
);
assert_eq!(
- micromark_with_options(r###"[link] bar](/uri)
-"###, DANGER),
+ micromark_with_options(
+ r###"[link] bar](/uri)
+"###,
+ &danger
+ ),
r###"[link] bar](/uri)
"###,
r###"Links (512)"###
);
assert_eq!(
- micromark_with_options(r###"[link [bar](/uri)
-"###, DANGER),
+ micromark_with_options(
+ r###"[link [bar](/uri)
+"###,
+ &danger
+ ),
r###"[link bar
"###,
r###"Links (513)"###
);
assert_eq!(
- micromark_with_options(r###"[link \[bar](/uri)
-"###, DANGER),
+ micromark_with_options(
+ r###"[link \[bar](/uri)
+"###,
+ &danger
+ ),
r###"link [bar
"###,
r###"Links (514)"###
);
assert_eq!(
- micromark_with_options(r###"[link *foo **bar** `#`*](/uri)
-"###, DANGER),
+ micromark_with_options(
+ r###"[link *foo **bar** `#`*](/uri)
+"###,
+ &danger
+ ),
r###"link foo bar #
"###,
r###"Links (515)"###
);
assert_eq!(
- micromark_with_options(r###"[![moon](moon.jpg)](/uri)
-"###, DANGER),
+ micromark_with_options(
+ r###"[![moon](moon.jpg)](/uri)
+"###,
+ &danger
+ ),
r###"![moon](moon.jpg)
"###,
r###"Links (516)"###
);
assert_eq!(
- micromark_with_options(r###"[foo [bar](/uri)](/uri)
-"###, DANGER),
+ micromark_with_options(
+ r###"[foo [bar](/uri)](/uri)
+"###,
+ &danger
+ ),
r###"[foo bar](/uri)
"###,
r###"Links (517)"###
);
assert_eq!(
- micromark_with_options(r###"[foo *[bar [baz](/uri)](/uri)*](/uri)
-"###, DANGER),
+ micromark_with_options(
+ r###"[foo *[bar [baz](/uri)](/uri)*](/uri)
+"###,
+ &danger
+ ),
r###"[foo [bar baz](/uri)](/uri)
"###,
r###"Links (518)"###
);
assert_eq!(
- micromark_with_options(r###"![[[foo](uri1)](uri2)](uri3)
-"###, DANGER),
+ micromark_with_options(
+ r###"![[[foo](uri1)](uri2)](uri3)
+"###,
+ &danger
+ ),
r###"![[foo](uri2)](uri3)
"###,
r###"Links (519)"###
);
assert_eq!(
- micromark_with_options(r###"*[foo*](/uri)
-"###, DANGER),
+ micromark_with_options(
+ r###"*[foo*](/uri)
+"###,
+ &danger
+ ),
r###"*foo*
"###,
r###"Links (520)"###
);
assert_eq!(
- micromark_with_options(r###"[foo *bar](baz*)
-"###, DANGER),
+ micromark_with_options(
+ r###"[foo *bar](baz*)
+"###,
+ &danger
+ ),
r###"foo *bar
"###,
r###"Links (521)"###
);
assert_eq!(
- micromark_with_options(r###"*foo [bar* baz]
-"###, DANGER),
+ micromark_with_options(
+ r###"*foo [bar* baz]
+"###,
+ &danger
+ ),
r###"foo [bar baz]
"###,
r###"Links (522)"###
);
assert_eq!(
- micromark_with_options(r###"[foo
-"###, DANGER),
+ micromark_with_options(
+ r###"[foo
+"###,
+ &danger
+ ),
r###"[foo
"###,
r###"Links (523)"###
);
assert_eq!(
- micromark_with_options(r###"[foo`](/uri)`
-"###, DANGER),
+ micromark_with_options(
+ r###"[foo`](/uri)`
+"###,
+ &danger
+ ),
r###"[foo](/uri)
"###,
r###"Links (524)"###
);
assert_eq!(
- micromark_with_options(r###"[foo
-"###, DANGER),
+ micromark_with_options(
+ r###"[foo
+"###,
+ &danger
+ ),
r###"[foohttp://example.com/?search=](uri)
"###,
r###"Links (525)"###
);
assert_eq!(
- micromark_with_options(r###"[foo][bar]
+ micromark_with_options(
+ r###"[foo][bar]
[bar]: /url "title"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Links (526)"###
);
assert_eq!(
- micromark_with_options(r###"[link [foo [bar]]][ref]
+ micromark_with_options(
+ r###"[link [foo [bar]]][ref]
[ref]: /uri
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"link [foo [bar]]
"###,
r###"Links (527)"###
);
assert_eq!(
- micromark_with_options(r###"[link \[bar][ref]
+ micromark_with_options(
+ r###"[link \[bar][ref]
[ref]: /uri
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"link [bar
"###,
r###"Links (528)"###
);
assert_eq!(
- micromark_with_options(r###"[link *foo **bar** `#`*][ref]
+ micromark_with_options(
+ r###"[link *foo **bar** `#`*][ref]
[ref]: /uri
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"link foo bar #
"###,
r###"Links (529)"###
);
assert_eq!(
- micromark_with_options(r###"[![moon](moon.jpg)][ref]
+ micromark_with_options(
+ r###"[![moon](moon.jpg)][ref]
[ref]: /uri
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"![moon](moon.jpg)
"###,
r###"Links (530)"###
);
assert_eq!(
- micromark_with_options(r###"[foo [bar](/uri)][ref]
+ micromark_with_options(
+ r###"[foo [bar](/uri)][ref]
[ref]: /uri
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"[foo bar]ref
"###,
r###"Links (531)"###
);
assert_eq!(
- micromark_with_options(r###"[foo *bar [baz][ref]*][ref]
+ micromark_with_options(
+ r###"[foo *bar [baz][ref]*][ref]
[ref]: /uri
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"[foo bar baz]ref
"###,
r###"Links (532)"###
);
assert_eq!(
- micromark_with_options(r###"*[foo*][ref]
+ micromark_with_options(
+ r###"*[foo*][ref]
[ref]: /uri
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"*foo*
"###,
r###"Links (533)"###
);
assert_eq!(
- micromark_with_options(r###"[foo *bar][ref]*
+ micromark_with_options(
+ r###"[foo *bar][ref]*
[ref]: /uri
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo *bar*
"###,
r###"Links (534)"###
);
assert_eq!(
- micromark_with_options(r###"[foo
+ micromark_with_options(
+ r###"[foo
[ref]: /uri
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"[foo
"###,
r###"Links (535)"###
);
assert_eq!(
- micromark_with_options(r###"[foo`][ref]`
+ micromark_with_options(
+ r###"[foo`][ref]`
[ref]: /uri
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"[foo][ref]
"###,
r###"Links (536)"###
);
assert_eq!(
- micromark_with_options(r###"[foo
+ micromark_with_options(
+ r###"[foo
[ref]: /uri
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"[foohttp://example.com/?search=][ref]
"###,
r###"Links (537)"###
);
assert_eq!(
- micromark_with_options(r###"[foo][BaR]
+ micromark_with_options(
+ r###"[foo][BaR]
[bar]: /url "title"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Links (538)"###
);
assert_eq!(
- micromark_with_options(r###"[ẞ]
+ micromark_with_options(
+ r###"[ẞ]
[SS]: /url
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"ẞ
"###,
r###"Links (539)"###
);
assert_eq!(
- micromark_with_options(r###"[Foo
+ micromark_with_options(
+ r###"[Foo
bar]: /url
[Baz][Foo bar]
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"Baz
"###,
r###"Links (540)"###
);
assert_eq!(
- micromark_with_options(r###"[foo] [bar]
+ micromark_with_options(
+ r###"[foo] [bar]
[bar]: /url "title"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"[foo] bar
"###,
r###"Links (541)"###
);
assert_eq!(
- micromark_with_options(r###"[foo]
+ micromark_with_options(
+ r###"[foo]
[bar]
[bar]: /url "title"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"[foo]
bar
"###,
@@ -6174,32 +7800,41 @@ bar>)
);
assert_eq!(
- micromark_with_options(r###"[foo]: /url1
+ micromark_with_options(
+ r###"[foo]: /url1
[foo]: /url2
[bar][foo]
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"bar
"###,
r###"Links (543)"###
);
assert_eq!(
- micromark_with_options(r###"[bar][foo\!]
+ micromark_with_options(
+ r###"[bar][foo\!]
[foo!]: /url
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"[bar][foo!]
"###,
r###"Links (544)"###
);
assert_eq!(
- micromark_with_options(r###"[foo][ref[]
+ micromark_with_options(
+ r###"[foo][ref[]
[ref[]: /uri
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"[foo][ref[]
[ref[]: /uri
"###,
@@ -6207,10 +7842,13 @@ bar>)
);
assert_eq!(
- micromark_with_options(r###"[foo][ref[bar]]
+ micromark_with_options(
+ r###"[foo][ref[bar]]
[ref[bar]]: /uri
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"[foo][ref[bar]]
[ref[bar]]: /uri
"###,
@@ -6218,10 +7856,13 @@ bar>)
);
assert_eq!(
- micromark_with_options(r###"[[[foo]]]
+ micromark_with_options(
+ r###"[[[foo]]]
[[[foo]]]: /url
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"[[[foo]]]
[[[foo]]]: /url
"###,
@@ -6229,30 +7870,39 @@ bar>)
);
assert_eq!(
- micromark_with_options(r###"[foo][ref\[]
+ micromark_with_options(
+ r###"[foo][ref\[]
[ref\[]: /uri
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Links (548)"###
);
assert_eq!(
- micromark_with_options(r###"[bar\\]: /uri
+ micromark_with_options(
+ r###"[bar\\]: /uri
[bar\\]
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"bar\
"###,
r###"Links (549)"###
);
assert_eq!(
- micromark_with_options(r###"[]
+ micromark_with_options(
+ r###"[]
[]: /uri
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"[]
[]: /uri
"###,
@@ -6260,12 +7910,15 @@ bar>)
);
assert_eq!(
- micromark_with_options(r###"[
+ micromark_with_options(
+ r###"[
]
[
]: /uri
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"[
]
[
@@ -6275,41 +7928,53 @@ bar>)
);
assert_eq!(
- micromark_with_options(r###"[foo][]
+ micromark_with_options(
+ r###"[foo][]
[foo]: /url "title"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Links (552)"###
);
assert_eq!(
- micromark_with_options(r###"[*foo* bar][]
+ micromark_with_options(
+ r###"[*foo* bar][]
[*foo* bar]: /url "title"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo bar
"###,
r###"Links (553)"###
);
assert_eq!(
- micromark_with_options(r###"[Foo][]
+ micromark_with_options(
+ r###"[Foo][]
[foo]: /url "title"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"Foo
"###,
r###"Links (554)"###
);
assert_eq!(
- micromark_with_options(r###"[foo]
+ micromark_with_options(
+ r###"[foo]
[]
[foo]: /url "title"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
[]
"###,
@@ -6317,300 +7982,393 @@ bar>)
);
assert_eq!(
- micromark_with_options(r###"[foo]
+ micromark_with_options(
+ r###"[foo]
[foo]: /url "title"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Links (556)"###
);
assert_eq!(
- micromark_with_options(r###"[*foo* bar]
+ micromark_with_options(
+ r###"[*foo* bar]
[*foo* bar]: /url "title"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo bar
"###,
r###"Links (557)"###
);
assert_eq!(
- micromark_with_options(r###"[[*foo* bar]]
+ micromark_with_options(
+ r###"[[*foo* bar]]
[*foo* bar]: /url "title"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"[foo bar]
"###,
r###"Links (558)"###
);
assert_eq!(
- micromark_with_options(r###"[[bar [foo]
+ micromark_with_options(
+ r###"[[bar [foo]
[foo]: /url
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"[[bar foo
"###,
r###"Links (559)"###
);
assert_eq!(
- micromark_with_options(r###"[Foo]
+ micromark_with_options(
+ r###"[Foo]
[foo]: /url "title"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"Foo
"###,
r###"Links (560)"###
);
assert_eq!(
- micromark_with_options(r###"[foo] bar
+ micromark_with_options(
+ r###"[foo] bar
[foo]: /url
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo bar
"###,
r###"Links (561)"###
);
assert_eq!(
- micromark_with_options(r###"\[foo]
+ micromark_with_options(
+ r###"\[foo]
[foo]: /url "title"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"[foo]
"###,
r###"Links (562)"###
);
assert_eq!(
- micromark_with_options(r###"[foo*]: /url
+ micromark_with_options(
+ r###"[foo*]: /url
*[foo*]
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"*foo*
"###,
r###"Links (563)"###
);
assert_eq!(
- micromark_with_options(r###"[foo][bar]
+ micromark_with_options(
+ r###"[foo][bar]
[foo]: /url1
[bar]: /url2
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Links (564)"###
);
assert_eq!(
- micromark_with_options(r###"[foo][]
+ micromark_with_options(
+ r###"[foo][]
[foo]: /url1
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Links (565)"###
);
assert_eq!(
- micromark_with_options(r###"[foo]()
+ micromark_with_options(
+ r###"[foo]()
[foo]: /url1
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Links (566)"###
);
assert_eq!(
- micromark_with_options(r###"[foo](not a link)
+ micromark_with_options(
+ r###"[foo](not a link)
[foo]: /url1
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo(not a link)
"###,
r###"Links (567)"###
);
assert_eq!(
- micromark_with_options(r###"[foo][bar][baz]
+ micromark_with_options(
+ r###"[foo][bar][baz]
[baz]: /url
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"[foo]bar
"###,
r###"Links (568)"###
);
assert_eq!(
- micromark_with_options(r###"[foo][bar][baz]
+ micromark_with_options(
+ r###"[foo][bar][baz]
[baz]: /url1
[bar]: /url2
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foobaz
"###,
r###"Links (569)"###
);
assert_eq!(
- micromark_with_options(r###"[foo][bar][baz]
+ micromark_with_options(
+ r###"[foo][bar][baz]
[baz]: /url1
[foo]: /url2
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"[foo]bar
"###,
r###"Links (570)"###
);
assert_eq!(
- micromark_with_options(r###"![foo](/url "title")
-"###, DANGER),
+ micromark_with_options(
+ r###"![foo](/url "title")
+"###,
+ &danger
+ ),
r###"![title foo](/url)
"###,
r###"Images (571)"###
);
assert_eq!(
- micromark_with_options(r###"![foo *bar*]
+ micromark_with_options(
+ r###"![foo *bar*]
[foo *bar*]: train.jpg "train & tracks"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"![train & tracks foo bar](train.jpg)
"###,
r###"Images (572)"###
);
assert_eq!(
- micromark_with_options(r###"![foo ![bar](/url)](/url2)
-"###, DANGER),
+ micromark_with_options(
+ r###"![foo ![bar](/url)](/url2)
+"###,
+ &danger
+ ),
r###"![foo bar](/url2)
"###,
r###"Images (573)"###
);
assert_eq!(
- micromark_with_options(r###"![foo [bar](/url)](/url2)
-"###, DANGER),
+ micromark_with_options(
+ r###"![foo [bar](/url)](/url2)
+"###,
+ &danger
+ ),
r###"![foo bar](/url2)
"###,
r###"Images (574)"###
);
assert_eq!(
- micromark_with_options(r###"![foo *bar*][]
+ micromark_with_options(
+ r###"![foo *bar*][]
[foo *bar*]: train.jpg "train & tracks"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"![train & tracks foo bar](train.jpg)
"###,
r###"Images (575)"###
);
assert_eq!(
- micromark_with_options(r###"![foo *bar*][foobar]
+ micromark_with_options(
+ r###"![foo *bar*][foobar]
[FOOBAR]: train.jpg "train & tracks"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"![train & tracks foo bar](train.jpg)
"###,
r###"Images (576)"###
);
assert_eq!(
- micromark_with_options(r###"![foo](train.jpg)
-"###, DANGER),
+ micromark_with_options(
+ r###"![foo](train.jpg)
+"###,
+ &danger
+ ),
r###"![foo](train.jpg)
"###,
r###"Images (577)"###
);
assert_eq!(
- micromark_with_options(r###"My ![foo bar](/path/to/train.jpg "title" )
-"###, DANGER),
+ micromark_with_options(
+ r###"My ![foo bar](/path/to/train.jpg "title" )
+"###,
+ &danger
+ ),
r###"My ![title foo bar](/path/to/train.jpg)
"###,
r###"Images (578)"###
);
assert_eq!(
- micromark_with_options(r###"![foo]()
-"###, DANGER),
+ micromark_with_options(
+ r###"![foo]()
+"###,
+ &danger
+ ),
r###"![foo](url)
"###,
r###"Images (579)"###
);
assert_eq!(
- micromark_with_options(r###"![](/url)
-"###, DANGER),
+ micromark_with_options(
+ r###"![](/url)
+"###,
+ &danger
+ ),
r###"![](/url)
"###,
r###"Images (580)"###
);
assert_eq!(
- micromark_with_options(r###"![foo][bar]
+ micromark_with_options(
+ r###"![foo][bar]
[bar]: /url
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"![foo](/url)
"###,
r###"Images (581)"###
);
assert_eq!(
- micromark_with_options(r###"![foo][bar]
+ micromark_with_options(
+ r###"![foo][bar]
[BAR]: /url
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"![foo](/url)
"###,
r###"Images (582)"###
);
assert_eq!(
- micromark_with_options(r###"![foo][]
+ micromark_with_options(
+ r###"![foo][]
[foo]: /url "title"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"![title foo](/url)
"###,
r###"Images (583)"###
);
assert_eq!(
- micromark_with_options(r###"![*foo* bar][]
+ micromark_with_options(
+ r###"![*foo* bar][]
[*foo* bar]: /url "title"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"![title foo bar](/url)
"###,
r###"Images (584)"###
);
assert_eq!(
- micromark_with_options(r###"![Foo][]
+ micromark_with_options(
+ r###"![Foo][]
[foo]: /url "title"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"![title Foo](/url)
"###,
r###"Images (585)"###
);
assert_eq!(
- micromark_with_options(r###"![foo]
+ micromark_with_options(
+ r###"![foo]
[]
[foo]: /url "title"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
[]
"###,
@@ -6618,30 +8376,39 @@ bar>)
);
assert_eq!(
- micromark_with_options(r###"![foo]
+ micromark_with_options(
+ r###"![foo]
[foo]: /url "title"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"![title foo](/url)
"###,
r###"Images (587)"###
);
assert_eq!(
- micromark_with_options(r###"![*foo* bar]
+ micromark_with_options(
+ r###"![*foo* bar]
[*foo* bar]: /url "title"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"![title foo bar](/url)
"###,
r###"Images (588)"###
);
assert_eq!(
- micromark_with_options(r###"![[foo]]
+ micromark_with_options(
+ r###"![[foo]]
[[foo]]: /url "title"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"![[foo]]
[[foo]]: /url "title"
"###,
@@ -6649,207 +8416,282 @@ bar>)
);
assert_eq!(
- micromark_with_options(r###"![Foo]
+ micromark_with_options(
+ r###"![Foo]
[foo]: /url "title"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"![title Foo](/url)
"###,
r###"Images (590)"###
);
assert_eq!(
- micromark_with_options(r###"!\[foo]
+ micromark_with_options(
+ r###"!\[foo]
[foo]: /url "title"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"![foo]
"###,
r###"Images (591)"###
);
assert_eq!(
- micromark_with_options(r###"\![foo]
+ micromark_with_options(
+ r###"\![foo]
[foo]: /url "title"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"!foo
"###,
r###"Images (592)"###
);
assert_eq!(
- micromark_with_options(r###"
-"###, DANGER),
+ micromark_with_options(
+ r###"
+"###,
+ &danger
+ ),
r###"http://foo.bar.baz
"###,
r###"Autolinks (593)"###
);
assert_eq!(
- micromark_with_options(r###"
-"###, DANGER),
+ micromark_with_options(
+ r###"
+"###,
+ &danger
+ ),
r###"http://foo.bar.baz/test?q=hello&id=22&boolean
"###,
r###"Autolinks (594)"###
);
assert_eq!(
- micromark_with_options(r###"
-"###, DANGER),
+ micromark_with_options(
+ r###"
+"###,
+ &danger
+ ),
r###"irc://foo.bar:2233/baz
"###,
r###"Autolinks (595)"###
);
assert_eq!(
- micromark_with_options(r###"
-"###, DANGER),
+ micromark_with_options(
+ r###"
+"###,
+ &danger
+ ),
r###"MAILTO:FOO@BAR.BAZ
"###,
r###"Autolinks (596)"###
);
assert_eq!(
- micromark_with_options(r###"
-"###, DANGER),
+ micromark_with_options(
+ r###"
+"###,
+ &danger
+ ),
r###"a+b+c:d
"###,
r###"Autolinks (597)"###
);
assert_eq!(
- micromark_with_options(r###"
-"###, DANGER),
+ micromark_with_options(
+ r###"
+"###,
+ &danger
+ ),
r###"made-up-scheme://foo,bar
"###,
r###"Autolinks (598)"###
);
assert_eq!(
- micromark_with_options(r###"
-"###, DANGER),
+ micromark_with_options(
+ r###"
+"###,
+ &danger
+ ),
r###"http://../
"###,
r###"Autolinks (599)"###
);
assert_eq!(
- micromark_with_options(r###"
-"###, DANGER),
+ micromark_with_options(
+ r###"
+"###,
+ &danger
+ ),
r###"localhost:5001/foo
"###,
r###"Autolinks (600)"###
);
assert_eq!(
- micromark_with_options(r###"
-"###, DANGER),
+ micromark_with_options(
+ r###"
+"###,
+ &danger
+ ),
r###"<http://foo.bar/baz bim>
"###,
r###"Autolinks (601)"###
);
assert_eq!(
- micromark_with_options(r###"
-"###, DANGER),
+ micromark_with_options(
+ r###"
+"###,
+ &danger
+ ),
r###"http://example.com/\[\
"###,
r###"Autolinks (602)"###
);
assert_eq!(
- micromark_with_options(r###"
-"###, DANGER),
+ micromark_with_options(
+ r###"
+"###,
+ &danger
+ ),
r###"foo@bar.example.com
"###,
r###"Autolinks (603)"###
);
assert_eq!(
- micromark_with_options(r###"
-"###, DANGER),
+ micromark_with_options(
+ r###"
+"###,
+ &danger
+ ),
r###"foo+special@Bar.baz-bar0.com
"###,
r###"Autolinks (604)"###
);
assert_eq!(
- micromark_with_options(r###"
-"###, DANGER),
+ micromark_with_options(
+ r###"
+"###,
+ &danger
+ ),
r###"<foo+@bar.example.com>
"###,
r###"Autolinks (605)"###
);
assert_eq!(
- micromark_with_options(r###"<>
-"###, DANGER),
+ micromark_with_options(
+ r###"<>
+"###,
+ &danger
+ ),
r###"<>
"###,
r###"Autolinks (606)"###
);
assert_eq!(
- micromark_with_options(r###"< http://foo.bar >
-"###, DANGER),
+ micromark_with_options(
+ r###"< http://foo.bar >
+"###,
+ &danger
+ ),
r###"< http://foo.bar >
"###,
r###"Autolinks (607)"###
);
assert_eq!(
- micromark_with_options(r###"
-"###, DANGER),
+ micromark_with_options(
+ r###"
+"###,
+ &danger
+ ),
r###"<m:abc>
"###,
r###"Autolinks (608)"###
);
assert_eq!(
- micromark_with_options(r###"
-"###, DANGER),
+ micromark_with_options(
+ r###"
+"###,
+ &danger
+ ),
r###"<foo.bar.baz>
"###,
r###"Autolinks (609)"###
);
assert_eq!(
- micromark_with_options(r###"http://example.com
-"###, DANGER),
+ micromark_with_options(
+ r###"http://example.com
+"###,
+ &danger
+ ),
r###"http://example.com
"###,
r###"Autolinks (610)"###
);
assert_eq!(
- micromark_with_options(r###"foo@bar.example.com
-"###, DANGER),
+ micromark_with_options(
+ r###"foo@bar.example.com
+"###,
+ &danger
+ ),
r###"foo@bar.example.com
"###,
r###"Autolinks (611)"###
);
assert_eq!(
- micromark_with_options(r###"
-"###, DANGER),
+ micromark_with_options(
+ r###"
+"###,
+ &danger
+ ),
r###"
"###,
r###"Raw HTML (612)"###
);
assert_eq!(
- micromark_with_options(r###"
-"###, DANGER),
+ micromark_with_options(
+ r###"
+"###,
+ &danger
+ ),
r###"
"###,
r###"Raw HTML (613)"###
);
assert_eq!(
- micromark_with_options(r###"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
"###,
@@ -6857,9 +8699,12 @@ data="foo" >
);
assert_eq!(
- micromark_with_options(r###"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
"###,
@@ -6867,43 +8712,58 @@ _boolean zoop:33=zoop:33 />
);
assert_eq!(
- micromark_with_options(r###"Foo
-"###, DANGER),
+ micromark_with_options(
+ r###"Foo
+"###,
+ &danger
+ ),
r###"Foo
"###,
r###"Raw HTML (616)"###
);
assert_eq!(
- micromark_with_options(r###"<33> <__>
-"###, DANGER),
+ micromark_with_options(
+ r###"<33> <__>
+"###,
+ &danger
+ ),
r###"<33> <__>
"###,
r###"Raw HTML (617)"###
);
assert_eq!(
- micromark_with_options(r###"
-"###, DANGER),
+ micromark_with_options(
+ r###"
+"###,
+ &danger
+ ),
r###"<a h*#ref="hi">
"###,
r###"Raw HTML (618)"###
);
assert_eq!(
- micromark_with_options(r###"<a href="hi'> <a href=hi'>
"###,
r###"Raw HTML (619)"###
);
assert_eq!(
- micromark_with_options(r###"< a><
+ micromark_with_options(
+ r###"< a><
foo>
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"< a><
foo><bar/ >
<foo bar=baz
@@ -6913,33 +8773,45 @@ bim!bop />
);
assert_eq!(
- micromark_with_options(r###"
-"###, DANGER),
+ micromark_with_options(
+ r###"
+"###,
+ &danger
+ ),
r###"<a href='bar'title=title>
"###,
r###"Raw HTML (621)"###
);
assert_eq!(
- micromark_with_options(r###"
-"###, DANGER),
+ micromark_with_options(
+ r###"
+"###,
+ &danger
+ ),
r###"
"###,
r###"Raw HTML (622)"###
);
assert_eq!(
- micromark_with_options(r###"
-"###, DANGER),
+ micromark_with_options(
+ r###"
+"###,
+ &danger
+ ),
r###"</a href="foo">
"###,
r###"Raw HTML (623)"###
);
assert_eq!(
- micromark_with_options(r###"foo
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
"###,
@@ -6947,18 +8819,24 @@ comment - with hyphen -->
);
assert_eq!(
- micromark_with_options(r###"foo
-"###, DANGER),
+ micromark_with_options(
+ r###"foo
+"###,
+ &danger
+ ),
r###"foo <!-- not a comment -- two hyphens -->
"###,
r###"Raw HTML (625)"###
);
assert_eq!(
- micromark_with_options(r###"foo foo -->
+ micromark_with_options(
+ r###"foo foo -->
foo
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo <!--> foo -->
foo <!-- foo--->
"###,
@@ -6966,57 +8844,78 @@ foo
);
assert_eq!(
- micromark_with_options(r###"foo
-"###, DANGER),
+ micromark_with_options(
+ r###"foo
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Raw HTML (627)"###
);
assert_eq!(
- micromark_with_options(r###"foo
-"###, DANGER),
+ micromark_with_options(
+ r###"foo
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Raw HTML (628)"###
);
assert_eq!(
- micromark_with_options(r###"foo &<]]>
-"###, DANGER),
+ micromark_with_options(
+ r###"foo &<]]>
+"###,
+ &danger
+ ),
r###"foo &<]]>
"###,
r###"Raw HTML (629)"###
);
assert_eq!(
- micromark_with_options(r###"foo
-"###, DANGER),
+ micromark_with_options(
+ r###"foo
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Raw HTML (630)"###
);
assert_eq!(
- micromark_with_options(r###"foo
-"###, DANGER),
+ micromark_with_options(
+ r###"foo
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Raw HTML (631)"###
);
assert_eq!(
- micromark_with_options(r###"
-"###, DANGER),
+ micromark_with_options(
+ r###"
+"###,
+ &danger
+ ),
r###"<a href=""">
"###,
r###"Raw HTML (632)"###
);
assert_eq!(
- micromark_with_options(r###"foo
+ micromark_with_options(
+ r###"foo
baz
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
baz
"###,
@@ -7024,9 +8923,12 @@ baz
);
assert_eq!(
- micromark_with_options(r###"foo\
+ micromark_with_options(
+ r###"foo\
baz
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
baz
"###,
@@ -7034,9 +8936,12 @@ baz
);
assert_eq!(
- micromark_with_options(r###"foo
+ micromark_with_options(
+ r###"foo
baz
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
baz
"###,
@@ -7044,9 +8949,12 @@ baz
);
assert_eq!(
- micromark_with_options(r###"foo
+ micromark_with_options(
+ r###"foo
bar
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
bar
"###,
@@ -7054,9 +8962,12 @@ bar
);
assert_eq!(
- micromark_with_options(r###"foo\
+ micromark_with_options(
+ r###"foo\
bar
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
bar
"###,
@@ -7064,9 +8975,12 @@ bar
);
assert_eq!(
- micromark_with_options(r###"*foo
+ micromark_with_options(
+ r###"*foo
bar*
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
bar
"###,
@@ -7074,9 +8988,12 @@ bar
);
assert_eq!(
- micromark_with_options(r###"*foo\
+ micromark_with_options(
+ r###"*foo\
bar*
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
bar
"###,
@@ -7084,27 +9001,36 @@ bar
);
assert_eq!(
- micromark_with_options(r###"`code
+ micromark_with_options(
+ r###"`code
span`
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"code span
"###,
r###"Hard line breaks (640)"###
);
assert_eq!(
- micromark_with_options(r###"`code\
+ micromark_with_options(
+ r###"`code\
span`
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"code\ span
"###,
r###"Hard line breaks (641)"###
);
assert_eq!(
- micromark_with_options(r###"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
"###,
@@ -7112,9 +9038,12 @@ bar">
);
assert_eq!(
- micromark_with_options(r###"
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"
"###,
@@ -7122,41 +9051,56 @@ bar">
);
assert_eq!(
- micromark_with_options(r###"foo\
-"###, DANGER),
+ micromark_with_options(
+ r###"foo\
+"###,
+ &danger
+ ),
r###"foo\
"###,
r###"Hard line breaks (644)"###
);
assert_eq!(
- micromark_with_options(r###"foo
-"###, DANGER),
+ micromark_with_options(
+ r###"foo
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Hard line breaks (645)"###
);
assert_eq!(
- micromark_with_options(r###"### foo\
-"###, DANGER),
+ micromark_with_options(
+ r###"### foo\
+"###,
+ &danger
+ ),
r###"foo\
"###,
r###"Hard line breaks (646)"###
);
assert_eq!(
- micromark_with_options(r###"### foo
-"###, DANGER),
+ micromark_with_options(
+ r###"### foo
+"###,
+ &danger
+ ),
r###"foo
"###,
r###"Hard line breaks (647)"###
);
assert_eq!(
- micromark_with_options(r###"foo
+ micromark_with_options(
+ r###"foo
baz
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
baz
"###,
@@ -7164,9 +9108,12 @@ baz
);
assert_eq!(
- micromark_with_options(r###"foo
+ micromark_with_options(
+ r###"foo
baz
-"###, DANGER),
+"###,
+ &danger
+ ),
r###"foo
baz
"###,
@@ -7174,24 +9121,33 @@ baz
);
assert_eq!(
- micromark_with_options(r###"hello $.;'there
-"###, DANGER),
+ micromark_with_options(
+ r###"hello $.;'there
+"###,
+ &danger
+ ),
r###"hello $.;'there
"###,
r###"Textual content (650)"###
);
assert_eq!(
- micromark_with_options(r###"Foo χρῆν
-"###, DANGER),
+ micromark_with_options(
+ r###"Foo χρῆν
+"###,
+ &danger
+ ),
r###"Foo χρῆν
"###,
r###"Textual content (651)"###
);
assert_eq!(
- micromark_with_options(r###"Multiple spaces
-"###, DANGER),
+ micromark_with_options(
+ r###"Multiple spaces
+"###,
+ &danger
+ ),
r###"Multiple spaces
"###,
r###"Textual content (652)"###
--
cgit
|