From b6342221eb3cacda6e893d7d35bf291944c664d9 Mon Sep 17 00:00:00 2001
From: Titus Wormer foo foo !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ \ \A\a\ \3\φ\« *not emphasized*
<br/> not a tag
[not a link](/foo)
@@ -223,597 +184,464 @@ bar
ö not a character entity \emphasis foo & © Æ Ď
¾ ℋ ⅆ
∲ ≧̸ # Ӓ Ϡ � " ആ ಫ   &x; &#; &#x;
�
&#abcdef0;
&ThisIsNotDefined; &hi?; © &MadeUpEntity; *foo*
foo * foo * foo foo
bar foo [a](url "tit") +++ === --
**
__ Foo
*** _ _ _ _ a a------ ---a--- - Foo bar bar ####### foo #5 bolt #hashtag ## foo foo
# bar Foo bar Bar foo Foo
--- Foo
= = Foo ` of dashes"/> Foo foo
- // bar
- // === foo
+// bar
+// === Baz ==== foo Foo baz Foo
bar baz Foo
bar baz Foo
bar
---
baz foo
"###,
r###"Tabs (0)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###" foo baz bim
-"###,
- DANGER
- ),
+ micromark_with_options(r###" foo baz bim
+"###, DANGER),
r###"foo baz bim
"###,
r###"Tabs (1)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###" a a
+ micromark_with_options(r###" a a
ὐ a
-"###,
- DANGER
- ),
+"###, DANGER),
r###"foo baz bim
"###,
r###"Tabs (2)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###" - foo
+ micromark_with_options(r###" - foo
bar
-"###,
- DANGER
- ),
+"###, DANGER),
r###"a a
ὐ a
"###,
r###"Tabs (3)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"- foo
+ micromark_with_options(r###"- foo
bar
-"###,
- DANGER
- ),
+"###, DANGER),
r###"
"###,
r###"Tabs (4)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"> foo
-"###,
- DANGER
- ),
+ micromark_with_options(r###"> foo
+"###, DANGER),
r###"
"###,
r###"Tabs (5)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"- foo
-"###,
- DANGER
- ),
+ micromark_with_options(r###"- foo
+"###, DANGER),
r###" foo
"###,
r###"Tabs (6)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###" foo
+ micromark_with_options(r###" foo
bar
-"###,
- DANGER
- ),
+"###, DANGER),
r###" foo
@@ -117,90 +97,73 @@ fn commonmark() {
"###,
r###"Tabs (7)"###
- );
-
- // To do: eol after containers.
- // assert_eq!(
- // micromark_with_options(r###" - foo
- // - bar
- // - baz
- // "###, DANGER),
- // r###"foo
bar
- //
- // "###,
- // r###"Tabs (8)"###
- // );
+);
assert_eq!(
- micromark_with_options(
- r###"# Foo
+ micromark_with_options(r###" - foo
+ - bar
+ - baz
+"###, DANGER),
+ r###"
- //
- //
- //
- //
+
"###,
- DANGER
- ),
+ r###"Tabs (8)"###
+);
+
+ assert_eq!(
+ micromark_with_options(r###"# Foo
+"###, DANGER),
r###"
+
+
+
+Foo
"###,
r###"Tabs (9)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"* * *
-"###,
- DANGER
- ),
+ micromark_with_options(r###"* * *
+"###, DANGER),
r###"
"###,
r###"Tabs (10)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}\~
-"###,
- DANGER
- ),
+ micromark_with_options(r###"\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}\~
+"###, DANGER),
r###"
not a tag
\[not a link](/foo)
\`not code`
@@ -209,9 +172,7 @@ bar
\# not a heading
\[foo]: /url "not a reference"
\ö not a character entity
-"###,
- DANGER
- ),
+"###, DANGER),
r###"
bar\[\`
"###,
r###"Backslash escapes (17)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"~~~
+ micromark_with_options(r###"~~~
\[\]
~~~
-"###,
- DANGER
- ),
+"###, DANGER),
r###"\[\]
"###,
r###"Backslash escapes (18)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"\[\]
"###,
r###"Backslash escapes (23)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###" & © Æ Ď
+ micromark_with_options(r###" & © Æ Ď
¾ ℋ ⅆ
∲ ≧̸
-"###,
- DANGER
- ),
+"###, DANGER),
r###"foo
"###,
r###"Entity and numeric character references (33)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"`föö`
-"###,
- DANGER
- ),
+ micromark_with_options(r###"`föö`
+"###, DANGER),
r###"foo
föö
"###,
r###"Entity and numeric character references (35)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"*foo*
+ micromark_with_options(r###"*foo*
*foo*
-"###,
- DANGER
- ),
+"###, DANGER),
r###"föfö
- //
- // "###,
- // r###"Entity and numeric character references (37)"###
- // );
+* foo
+"###, DANGER),
+ r###"
+
+"###,
+ r###"Entity and numeric character references (37)"###
+);
assert_eq!(
- micromark_with_options(
- r###"foo
bar
-"###,
- DANGER
- ),
+ micromark_with_options(r###"foo
bar
+"###, DANGER),
r###"
- //
- // "###,
- // r###"Precedence (41)"###
- // );
+ assert_eq!(
+ micromark_with_options(r###"- `one
+- two`
+"###, DANGER),
+ r###"
+
+"###,
+ r###"Precedence (41)"###
+);
assert_eq!(
- micromark_with_options(
- r###"***
+ micromark_with_options(r###"***
---
___
-"###,
- DANGER
- ),
+"###, DANGER),
r###"
"###,
r###"Thematic breaks (42)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"+++
-"###,
- DANGER
- ),
+ micromark_with_options(r###"+++
+"###, DANGER),
r###"
"###,
r###"Thematic breaks (46)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###" ***
-"###,
- DANGER
- ),
+ micromark_with_options(r###" ***
+"###, DANGER),
r###"
"###,
r###"Thematic breaks (47)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"Foo
+ micromark_with_options(r###"Foo
***
-"###,
- DANGER
- ),
+"###, DANGER),
r###"***
"###,
r###"Thematic breaks (49)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###" - - -
-"###,
- DANGER
- ),
+ micromark_with_options(r###" - - -
+"###, DANGER),
r###"
"###,
r###"Thematic breaks (50)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###" ** * ** * ** * **
-"###,
- DANGER
- ),
+ micromark_with_options(r###" ** * ** * ** * **
+"###, DANGER),
r###"
"###,
r###"Thematic breaks (51)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"- - - -
-"###,
- DANGER
- ),
+ micromark_with_options(r###"- - - -
+"###, DANGER),
r###"
"###,
r###"Thematic breaks (52)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"- - - -
-"###,
- DANGER
- ),
+ micromark_with_options(r###"- - - -
+"###, DANGER),
r###"
"###,
r###"Thematic breaks (53)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"_ _ _ _ a
+ micromark_with_options(r###"_ _ _ _ a
a------
---a---
-"###,
- DANGER
- ),
+"###, DANGER),
r###"
- //
- //
- //
- //
- // "###,
- // r###"Thematic breaks (56)"###
- // );
+ assert_eq!(
+ micromark_with_options(r###"- foo
+***
+- bar
+"###, DANGER),
+ r###"
+
+
+
+
+"###,
+ r###"Thematic breaks (56)"###
+);
assert_eq!(
- micromark_with_options(
- r###"Foo
+ micromark_with_options(r###"Foo
***
bar
-"###,
- DANGER
- ),
+"###, DANGER),
r###"
Foo
- //
- //
- //
- //
- // "###,
- // r###"Thematic breaks (59)"###
- // );
+ assert_eq!(
+ micromark_with_options(r###"* Foo
+* * *
+* Bar
+"###, DANGER),
+ r###"
+
+
+
+
+"###,
+ r###"Thematic breaks (59)"###
+);
assert_eq!(
- micromark_with_options(
- r###"- Foo
+ micromark_with_options(r###"- Foo
- * * *
-"###,
- DANGER
- ),
+"###, DANGER),
r###"
"###,
r###"Thematic breaks (60)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"# foo
+ micromark_with_options(r###"# foo
## foo
### foo
#### foo
##### foo
###### foo
-"###,
- DANGER
- ),
+"###, DANGER),
r###"foo
foo
foo
@@ -843,288 +668,224 @@ bar
foo
"###,
r###"ATX headings (61)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"####### foo
-"###,
- DANGER
- ),
+ micromark_with_options(r###"####### foo
+"###, DANGER),
r###"foo bar *baz*
"###,
r###"ATX headings (65)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"# foo
-"###,
- DANGER
- ),
+ micromark_with_options(r###"# foo
+"###, DANGER),
r###"foo
"###,
r###"ATX headings (66)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###" ### foo
+ micromark_with_options(r###" ### foo
## foo
# foo
-"###,
- DANGER
- ),
+"###, DANGER),
r###"foo
foo
foo
"###,
r###"ATX headings (67)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###" # foo
-"###,
- DANGER
- ),
+ micromark_with_options(r###" # foo
+"###, DANGER),
r###"
"###,
r###"ATX headings (68)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"foo
+ micromark_with_options(r###"foo
# bar
-"###,
- DANGER
- ),
+"###, DANGER),
r###"# foo
foo
bar
"###,
r###"ATX headings (70)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"# foo ##################################
+ micromark_with_options(r###"# foo ##################################
##### foo ##
-"###,
- DANGER
- ),
+"###, DANGER),
r###"foo
foo
"###,
r###"ATX headings (71)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"### foo ###
-"###,
- DANGER
- ),
+ micromark_with_options(r###"### foo ###
+"###, DANGER),
r###"foo
"###,
r###"ATX headings (72)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"### foo ### b
-"###,
- DANGER
- ),
+ micromark_with_options(r###"### foo ### b
+"###, DANGER),
r###"foo ### b
"###,
r###"ATX headings (73)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"# foo#
-"###,
- DANGER
- ),
+ micromark_with_options(r###"# foo#
+"###, DANGER),
r###"foo#
"###,
r###"ATX headings (74)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"### foo \###
+ micromark_with_options(r###"### foo \###
## foo #\##
# foo \#
-"###,
- DANGER
- ),
+"###, DANGER),
r###"foo ###
foo ###
foo #
"###,
r###"ATX headings (75)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"****
+ micromark_with_options(r###"****
## foo
****
-"###,
- DANGER
- ),
+"###, DANGER),
r###"
foo
"###,
r###"ATX headings (76)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"Foo bar
+ micromark_with_options(r###"Foo bar
# baz
Bar foo
-"###,
- DANGER
- ),
+"###, DANGER),
r###"baz
Foo bar
Foo bar
"###,
r###"Setext headings (79)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"Foo *bar
+ micromark_with_options(r###"Foo *bar
baz*
====
-"###,
- DANGER
- ),
+"###, DANGER),
r###"Foo bar
baz
"###,
r###"Setext headings (80)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###" Foo *bar
-baz*
+ micromark_with_options(r###" Foo *bar
+baz*
====
-"###,
- DANGER
- ),
+"###, DANGER),
r###"Foo bar
baz
"###,
r###"Setext headings (81)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"Foo
+ micromark_with_options(r###"Foo
-------------------------
Foo
=
-"###,
- DANGER
- ),
+"###, DANGER),
r###"Foo
Foo
"###,
r###"Setext headings (82)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###" Foo
+ micromark_with_options(r###" Foo
---
Foo
@@ -1132,26 +893,21 @@ Foo
Foo
===
-"###,
- DANGER
- ),
+"###, DANGER),
r###"Foo
Foo
Foo
"###,
r###"Setext headings (83)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###" Foo
+ micromark_with_options(r###" Foo
---
Foo
---
-"###,
- DANGER
- ),
+"###, DANGER),
r###"Foo
---
@@ -1160,346 +916,280 @@ Foo
"###,
r###"Setext headings (84)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"Foo
- ----
-"###,
- DANGER
- ),
+ micromark_with_options(r###"Foo
+ ----
+"###, DANGER),
r###"Foo
"###,
r###"Setext headings (85)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"Foo
+ micromark_with_options(r###"Foo
---
-"###,
- DANGER
- ),
+"###, DANGER),
r###"
"###,
r###"Setext headings (87)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"Foo
+ micromark_with_options(r###"Foo
-----
-"###,
- DANGER
- ),
+"###, DANGER),
r###"Foo
"###,
r###"Setext headings (88)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"Foo\
+ micromark_with_options(r###"Foo\
----
-"###,
- DANGER
- ),
+"###, DANGER),
r###"Foo\
"###,
r###"Setext headings (89)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"`Foo
+ micromark_with_options(r###"`Foo
----
`
-"###,
- DANGER
- ),
+"###, DANGER),
r###"`Foo
<a title="a lot
"###,
r###"Setext headings (91)"###
- );
-
- // To do: setext heading interrupt?
- // assert_eq!(
- // micromark_with_options(r###"> foo
- // bar
- // ===
- // "###, DANGER),
- // r###"
- //
- // "###,
- // r###"Setext headings (92)"###
- // );
-
- assert_eq!(
- micromark_with_options(
- r###"- Foo
+);
+
+// To do: some interruption bug.
+// assert_eq!(
+// micromark_with_options(r###"> foo
+// bar
+// ===
+// "###, DANGER),
+// r###"
+//
+// "###,
+// r###"Setext headings (92)"###
+// );
+
+ assert_eq!(
+ micromark_with_options(r###"- Foo
---
-"###,
- DANGER
- ),
+"###, DANGER),
r###"
"###,
r###"Setext headings (93)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"Foo
+ micromark_with_options(r###"Foo
Bar
---
-"###,
- DANGER
- ),
+"###, DANGER),
r###"Foo
Bar
"###,
r###"Setext headings (94)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"---
+ micromark_with_options(r###"---
Foo
---
Bar
---
Baz
-"###,
- DANGER
- ),
+"###, DANGER),
r###"
Foo
Bar
"###,
r###"Setext headings (97)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"- foo
+ micromark_with_options(r###"- foo
-----
-"###,
- DANGER
- ),
+"###, DANGER),
r###"
"###,
r###"Setext headings (98)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###" foo
+ micromark_with_options(r###" foo
---
-"###,
- DANGER
- ),
+"###, DANGER),
r###"foo
"###,
r###"Setext headings (99)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"> foo
+ micromark_with_options(r###"> foo
-----
-"###,
- DANGER
- ),
+"###, DANGER),
r###"
"###,
r###"Setext headings (100)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"\> foo
+ micromark_with_options(r###"\> foo
------
-"###,
- DANGER
- ),
+"###, DANGER),
r###"> foo
"###,
r###"Setext headings (101)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"Foo
+ micromark_with_options(r###"Foo
bar
---
baz
-"###,
- DANGER
- ),
+"###, DANGER),
r###"bar
"###,
r###"Indented code blocks (106)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###" - foo
+ micromark_with_options(r###" - foo
bar
-"###,
- DANGER
- ),
+"###, DANGER),
r###"a simple
indented code block
foo
- //foo
+<a/>
*hi*
@@ -1544,20 +1230,17 @@ baz
"###,
r###"Indented code blocks (109)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###" chunk1
+ micromark_with_options(r###" chunk1
chunk2
-
-
-
+
+
+
chunk3
-"###,
- DANGER
- ),
+"###, DANGER),
r###"chunk1
chunk2
@@ -1568,63 +1251,51 @@ chunk3
"###,
r###"Indented code blocks (110)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###" chunk1
-
+ micromark_with_options(r###" chunk1
+
chunk2
-"###,
- DANGER
- ),
+"###, DANGER),
r###"chunk1
-
+
chunk2
"###,
r###"Indented code blocks (111)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"Foo
+ micromark_with_options(r###"Foo
bar
-"###,
- DANGER
- ),
+"###, DANGER),
r###"Foo bar
"###, r###"Indented code blocks (112)"### - ); +); assert_eq!( - micromark_with_options( - r###" foo + micromark_with_options(r###" foo bar -"###, - DANGER - ), +"###, DANGER), r###"foo
bar
"###, r###"Indented code blocks (113)"### - ); +); assert_eq!( - micromark_with_options( - r###"# Heading + micromark_with_options(r###"# Heading foo Heading ------ foo ---- -"###, - DANGER - ), +"###, DANGER), r###"foo
@@ -1634,196 +1305,157 @@ Heading
foo
bar
"###,
r###"Indented code blocks (115)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"
-
+ micromark_with_options(r###"
+
foo
+
-
-"###,
- DANGER
- ),
+"###, DANGER),
r###"foo
"###,
r###"Indented code blocks (116)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###" foo
-"###,
- DANGER
- ),
- r###"foo
+ micromark_with_options(r###" foo
+"###, DANGER),
+ r###"foo
"###,
r###"Indented code blocks (117)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"```
+ micromark_with_options(r###"```
<
>
```
-"###,
- DANGER
- ),
+"###, DANGER),
r###"<
>
"###,
r###"Fenced code blocks (118)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"~~~
+ micromark_with_options(r###"~~~
<
>
~~~
-"###,
- DANGER
- ),
+"###, DANGER),
r###"<
>
"###,
r###"Fenced code blocks (119)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"``
+ micromark_with_options(r###"``
foo
``
-"###,
- DANGER
- ),
+"###, DANGER),
r###"foo
"###,
r###"Fenced code blocks (120)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"```
+ micromark_with_options(r###"```
aaa
~~~
```
-"###,
- DANGER
- ),
+"###, DANGER),
r###"aaa
~~~
"###,
r###"Fenced code blocks (121)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"~~~
+ micromark_with_options(r###"~~~
aaa
```
~~~
-"###,
- DANGER
- ),
+"###, DANGER),
r###"aaa
```
"###,
r###"Fenced code blocks (122)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"````
+ micromark_with_options(r###"````
aaa
```
``````
-"###,
- DANGER
- ),
+"###, DANGER),
r###"aaa
```
"###,
r###"Fenced code blocks (123)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"~~~~
+ micromark_with_options(r###"~~~~
aaa
~~~
~~~~
-"###,
- DANGER
- ),
+"###, DANGER),
r###"aaa
~~~
"###,
r###"Fenced code blocks (124)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"```
-"###,
- DANGER
- ),
+ micromark_with_options(r###"```
+"###, DANGER),
r###"
"###,
r###"Fenced code blocks (125)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"`````
+ micromark_with_options(r###"`````
```
aaa
-"###,
- DANGER
- ),
+"###, DANGER),
r###"
```
aaa
"###,
r###"Fenced code blocks (126)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"> ```
+ micromark_with_options(r###"> ```
> aaa
bbb
-"###,
- DANGER
- ),
+"###, DANGER),
r###"
aaa
@@ -1831,313 +1463,253 @@ bbb
bbb
"###,
r###"Fenced code blocks (127)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"```
-
+ micromark_with_options(r###"```
+
```
-"###,
- DANGER
- ),
+"###, DANGER),
r###"
-
+
"###,
r###"Fenced code blocks (128)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"```
+ micromark_with_options(r###"```
```
-"###,
- DANGER
- ),
+"###, DANGER),
r###"
"###,
r###"Fenced code blocks (129)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###" ```
+ micromark_with_options(r###" ```
aaa
aaa
```
-"###,
- DANGER
- ),
+"###, DANGER),
r###"aaa
aaa
"###,
r###"Fenced code blocks (130)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###" ```
+ micromark_with_options(r###" ```
aaa
aaa
aaa
```
-"###,
- DANGER
- ),
+"###, DANGER),
r###"aaa
aaa
aaa
"###,
r###"Fenced code blocks (131)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###" ```
+ micromark_with_options(r###" ```
aaa
aaa
aaa
```
-"###,
- DANGER
- ),
+"###, DANGER),
r###"aaa
aaa
aaa
"###,
r###"Fenced code blocks (132)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###" ```
+ micromark_with_options(r###" ```
aaa
```
-"###,
- DANGER
- ),
+"###, DANGER),
r###"```
aaa
```
"###,
r###"Fenced code blocks (133)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"```
+ micromark_with_options(r###"```
aaa
```
-"###,
- DANGER
- ),
+"###, DANGER),
r###"aaa
"###,
r###"Fenced code blocks (134)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###" ```
+ micromark_with_options(r###" ```
aaa
```
-"###,
- DANGER
- ),
+"###, DANGER),
r###"aaa
"###,
r###"Fenced code blocks (135)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"```
+ micromark_with_options(r###"```
aaa
```
-"###,
- DANGER
- ),
+"###, DANGER),
r###"aaa
```
"###,
r###"Fenced code blocks (136)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"``` ```
+ micromark_with_options(r###"``` ```
aaa
-"###,
- DANGER
- ),
+"###, DANGER),
r###"
aaa
"###,
r###"Fenced code blocks (137)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"~~~~~~
+ micromark_with_options(r###"~~~~~~
aaa
~~~ ~~
-"###,
- DANGER
- ),
+"###, DANGER),
r###"aaa
~~~ ~~
"###,
r###"Fenced code blocks (138)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"foo
+ micromark_with_options(r###"foo
```
bar
```
baz
-"###,
- DANGER
- ),
+"###, DANGER),
r###"foo
bar
baz
"###,
r###"Fenced code blocks (139)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"foo
+ micromark_with_options(r###"foo
---
~~~
bar
~~~
# baz
-"###,
- DANGER
- ),
+"###, DANGER),
r###"foo
bar
baz
"###,
r###"Fenced code blocks (140)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"```ruby
+ micromark_with_options(r###"```ruby
def foo(x)
return 3
end
```
-"###,
- DANGER
- ),
+"###, DANGER),
r###"def foo(x)
return 3
end
"###,
r###"Fenced code blocks (141)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"~~~~ ruby startline=3 $%@#$
+ micromark_with_options(r###"~~~~ ruby startline=3 $%@#$
def foo(x)
return 3
end
~~~~~~~
-"###,
- DANGER
- ),
+"###, DANGER),
r###"def foo(x)
return 3
end
"###,
r###"Fenced code blocks (142)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"````;
+ micromark_with_options(r###"````;
````
-"###,
- DANGER
- ),
+"###, DANGER),
r###"
"###,
r###"Fenced code blocks (143)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"``` aa ```
+ micromark_with_options(r###"``` aa ```
foo
-"###,
- DANGER
- ),
+"###, DANGER),
r###"aa
foo
"###,
r###"Fenced code blocks (144)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"~~~ aa ``` ~~~
+ micromark_with_options(r###"~~~ aa ``` ~~~
foo
~~~
-"###,
- DANGER
- ),
+"###, DANGER),
r###"foo
"###,
r###"Fenced code blocks (145)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"```
+ micromark_with_options(r###"```
``` aaa
```
-"###,
- DANGER
- ),
+"###, DANGER),
r###"``` aaa
"###,
r###"Fenced code blocks (146)"###
- );
+);
assert_eq!(
- micromark_with_options(
- r###"