diff --git a/examples.py b/examples.py index 728439f..2dba682 100644 --- a/examples.py +++ b/examples.py @@ -2,6 +2,7 @@ import parsel import httpx from pathlib import Path from textwrap import indent +from subprocess import Popen, PIPE VERSION = '0.31.2' @@ -17,36 +18,41 @@ else: CACHE.write_text(response.text) sel = parsel.Selector(response.text) -print( -'''const std = @import("std"); -const convert = @import("main.zig").convert; -''' -) + +formatter = Popen(['zig', 'fmt', '--stdin'], stdin=PIPE, encoding='utf-8') +assert formatter.stdin + +write = formatter.stdin.write + +write(f''' + //! Example cases from Commonmark spec {VERSION} + //! {URL} + + const std = @import("std"); + const convert = @import("main.zig").convert; +''') for example in sel.css('.example'): name = example.css('.examplenum > a::text').get() - md = example.css('.language-markdown::text').get() - html = example.css('.language-html::text').get() + + md = ''.join(example.css('.language-markdown *::text').getall()) + html = ''.join(example.css('.language-html *::text').getall()) assert name is not None - print(f''' -test "{name}" {{ - const alloc = std.testing.allocator; + write(f''' + test "{name}" {{ + const output = try convert(std.testing.allocator, + {indent(md, r'\\', lambda _: True) if md else '""'} + ); + defer std.testing.allocator.free(output); - const md = ( -{indent(md, r' \\', lambda _: True) if md else '""'} -); - const html = ( -{indent(html, r' \\', lambda _: True) if html else '""'} -); - - const output = try convert(alloc, md); - defer alloc.free(output); - - try std.testing.expectEqualStrings(html, output); -}} -''') - - # mdtext = textwrap.indent("md", '\\') + try std.testing.expectEqualStrings( + {indent(html, r'\\', lambda _: True) if html else '""'} + , + output + ); + }} + ''') +formatter.stdin.close() diff --git a/src/examples.zig b/src/examples.zig index f097d96..ddac4f4 100644 --- a/src/examples.zig +++ b/src/examples.zig @@ -1,179 +1,137 @@ +//! Example cases from Commonmark spec 0.31.2 +//! https://spec.commonmark.org/0.31.2/ + const std = @import("std"); const convert = @import("main.zig").convert; - test "Example 1" { - const alloc = std.testing.allocator; - - const md = ( + const output = try convert(std.testing.allocator, \\→foo→baz→→bim + ); + defer std.testing.allocator.free(output); -); - const html = ( + try std.testing.expectEqualStrings( \\
foo→baz→→bim
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 2" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\ →foo→baz→→bim
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\→foo→baz→→bim
-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo→baz→→bim
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 3" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\ a→a
+ \\ ὐ→a
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\a→a
-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\a→a
\\ὐ→a
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 4" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\ - foo
+ \\
+ \\→bar
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo
\\bar
\\foo
- \\
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\ bar
+ \\
+ \\
- \\+ , output); } - test "Example 7" { - const alloc = std.testing.allocator; - - const md = ( + const output = try convert(std.testing.allocator, \\-→→foo + ); + defer std.testing.allocator.free(output); -); - const html = ( + try std.testing.expectEqualStrings( \\-); - - const output = try convert(alloc, md); - defer alloc.free(output); - - try std.testing.expectEqualStrings(html, output); + \\
+ \\foo + \\
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\ foo
+ \\
+ \\
foo
\\bar
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 9" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\ - foo
+ \\ - bar
+ \\→ - baz
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
- -); - - const output = try convert(alloc, md); - defer alloc.free(output); - - try std.testing.expectEqualStrings(html, output); + , output); } - test "Example 13" { - const alloc = std.testing.allocator; + const output = try convert(std.testing.allocator, + \\\→\A\a\ \3\φ\« + ); + defer std.testing.allocator.free(output); - const md = ( - \\\→\A\a\ -); - const html = ( - \\\→\A\a\ -); - - const output = try convert(alloc, md); - defer alloc.free(output); - - try std.testing.expectEqualStrings(html, output); + try std.testing.expectEqualStrings( + \\
\→\A\a\ \3\φ\«
+ , output); } - test "Example 14" { - const alloc = std.testing.allocator; + const output = try convert(std.testing.allocator, + \\\*not emphasized* + \\\*not -); - - const output = try convert(alloc, md); - defer alloc.free(output); - - try std.testing.expectEqualStrings(html, output); + try std.testing.expectEqualStrings( + \\
*not emphasized* + \\<br/> not a tag + \\[not a link](/foo) + \\`not code` + \\1. not a list + \\* not a list + \\# not a heading + \\[foo]: /url "not a reference" + \\ö not a character entity
+ , output); } - test "Example 15" { - const alloc = std.testing.allocator; - - const md = ( + const output = try convert(std.testing.allocator, \\\\*emphasis* + ); + defer std.testing.allocator.free(output); -); - const html = ( + try std.testing.expectEqualStrings( \\\emphasis
- -); - - const output = try convert(alloc, md); - defer alloc.free(output); - - try std.testing.expectEqualStrings(html, output); + , output); } - test "Example 16" { - const alloc = std.testing.allocator; - - const md = ( + const output = try convert(std.testing.allocator, \\foo\ \\bar + ); + defer std.testing.allocator.free(output); -); - const html = ( - \\foo
foo
+ \\bar
\[\`
\[\]
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 19" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\~~~
\\\[\]
\\~~~
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\\[\]
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 20" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\foo
+ \\
+ , output);
}
-
test "Example 25" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\ & © Æ Ď
+ \\¾ ℋ ⅆ
+ \\∲ ≧̸
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\
-);
- const html = (
- \\-); - - const output = try convert(alloc, md); - defer alloc.free(output); - - try std.testing.expectEqualStrings(html, output); + try std.testing.expectEqualStrings( + \\
& © Æ Ď + \\¾ ℋ ⅆ + \\∲ ≧̸
+ , output); } - test "Example 26" { - const alloc = std.testing.allocator; + const output = try convert(std.testing.allocator, + \\# Ӓ Ϡ + ); + defer std.testing.allocator.free(output); - const md = ( - \\# -); - const html = ( - \\# -); - - const output = try convert(alloc, md); - defer alloc.free(output); - - try std.testing.expectEqualStrings(html, output); + try std.testing.expectEqualStrings( + \\
# Ӓ Ϡ �
+ , output); } - test "Example 27" { - const alloc = std.testing.allocator; + const output = try convert(std.testing.allocator, + \\" ആ ಫ + ); + defer std.testing.allocator.free(output); - const md = ( - \\" -); - const html = ( - \\" -); - - const output = try convert(alloc, md); - defer alloc.free(output); - - try std.testing.expectEqualStrings(html, output); + try std.testing.expectEqualStrings( + \\
" ആ ಫ
+ , output); } - test "Example 28" { - const alloc = std.testing.allocator; + const output = try convert(std.testing.allocator, + \\  &x; + \\ + \\abcdef0; + \\&ThisIsNotDefined; &hi?; + ); + defer std.testing.allocator.free(output); - const md = ( - \\  -); - const html = ( - \\  -); - - const output = try convert(alloc, md); - defer alloc.free(output); - - try std.testing.expectEqualStrings(html, output); + try std.testing.expectEqualStrings( + \\
  &x; &#; &#x; + \\� + \\&#abcdef0; + \\&ThisIsNotDefined; &hi?;
+ , output); } - test "Example 29" { - const alloc = std.testing.allocator; - - const md = ( + const output = try convert(std.testing.allocator, \\© + ); + defer std.testing.allocator.free(output); -); - const html = ( + try std.testing.expectEqualStrings( \\©
- -); - - const output = try convert(alloc, md); - defer alloc.free(output); - - try std.testing.expectEqualStrings(html, output); + , output); } - test "Example 30" { - const alloc = std.testing.allocator; - - const md = ( + const output = try convert(std.testing.allocator, \\&MadeUpEntity; + ); + defer std.testing.allocator.free(output); -); - const html = ( + try std.testing.expectEqualStrings( \\&MadeUpEntity;
- -); - - const output = try convert(alloc, md); - defer alloc.free(output); - - try std.testing.expectEqualStrings(html, output); + , output); } - test "Example 31" { - const alloc = std.testing.allocator; + const output = try convert(std.testing.allocator, + \\ + ); + defer std.testing.allocator.free(output); - const md = ( - \\ + , output); } - test "Example 32" { - const alloc = std.testing.allocator; + const output = try convert(std.testing.allocator, + \\[foo](/föö "föö") + ); + defer std.testing.allocator.free(output); - const md = ( - \\[foo](/föö -); - const html = ( - \\ + , output); } - test "Example 33" { - const alloc = std.testing.allocator; - - const md = ( + const output = try convert(std.testing.allocator, \\[foo] \\ - \\[foo]: -); - const html = ( - \\ + , output); } - test "Example 34" { - const alloc = std.testing.allocator; - - const md = ( + const output = try convert(std.testing.allocator, + \\``` föö + \\foo \\``` -); - const html = ( - \\foo
+ \\
+ , output);
}
-
test "Example 35" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\`föö`
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\föö
föfö
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 37" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\*foo*
\\*foo*
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\*foo* \\foo
- -); - - const output = try convert(alloc, md); - defer alloc.free(output); - - try std.testing.expectEqualStrings(html, output); + , output); } - test "Example 38" { - const alloc = std.testing.allocator; + const output = try convert(std.testing.allocator, + \\* foo + \\ + \\* foo + ); + defer std.testing.allocator.free(output); - const md = ( - \\* -); - const html = ( - \\* -); - - const output = try convert(alloc, md); - defer alloc.free(output); - - try std.testing.expectEqualStrings(html, output); + try std.testing.expectEqualStrings( + \\
* foo
+ \\foo \\ \\bar
- -); - - const output = try convert(alloc, md); - defer alloc.free(output); - - try std.testing.expectEqualStrings(html, output); + , output); } - test "Example 40" { - const alloc = std.testing.allocator; - - const md = ( + const output = try convert(std.testing.allocator, \\ foo + ); + defer std.testing.allocator.free(output); -); - const html = ( + try std.testing.expectEqualStrings( \\→foo
- -); - - const output = try convert(alloc, md); - defer alloc.free(output); - - try std.testing.expectEqualStrings(html, output); + , output); } - test "Example 41" { - const alloc = std.testing.allocator; + const output = try convert(std.testing.allocator, + \\[a](url "tit") + ); + defer std.testing.allocator.free(output); - const md = ( - \\[a](url -); - const html = ( - \\[a](url -); - - const output = try convert(alloc, md); - defer alloc.free(output); - - try std.testing.expectEqualStrings(html, output); + try std.testing.expectEqualStrings( + \\
[a](url "tit")
+ , output); } - test "Example 42" { - const alloc = std.testing.allocator; + const output = try convert(std.testing.allocator, + \\- `one + \\- two` + ); + defer std.testing.allocator.free(output); - const md = ( - \\- -); - const html = ( + try std.testing.expectEqualStrings( \\+++
- -); - - const output = try convert(alloc, md); - defer alloc.free(output); - - try std.testing.expectEqualStrings(html, output); + , output); } - test "Example 45" { - const alloc = std.testing.allocator; - - const md = ( + const output = try convert(std.testing.allocator, \\=== + ); + defer std.testing.allocator.free(output); -); - const html = ( + try std.testing.expectEqualStrings( \\===
- -); - - const output = try convert(alloc, md); - defer alloc.free(output); - - try std.testing.expectEqualStrings(html, output); + , output); } - test "Example 46" { - const alloc = std.testing.allocator; - - const md = ( + const output = try convert(std.testing.allocator, \\-- \\** \\__ + ); + defer std.testing.allocator.free(output); -); - const html = ( + try std.testing.expectEqualStrings( \\-- \\** \\__
- -); - - const output = try convert(alloc, md); - defer alloc.free(output); - - try std.testing.expectEqualStrings(html, output); + , output); } - test "Example 47" { - const alloc = std.testing.allocator; + const output = try convert(std.testing.allocator, + \\ *** + \\ *** + \\ *** + ); + defer std.testing.allocator.free(output); - const md = ( - \\*** - -); - const html = ( - \\***
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 49" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\Foo
+ \\ ***
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\Foo \\***
- -); - - const output = try convert(alloc, md); - defer alloc.free(output); - - try std.testing.expectEqualStrings(html, output); + , output); } - test "Example 50" { - const alloc = std.testing.allocator; - - const md = ( + const output = try convert(std.testing.allocator, \\_____________________________________ + ); + defer std.testing.allocator.free(output); -); - const html = ( - \\_ -); - - const output = try convert(alloc, md); - defer alloc.free(output); - - try std.testing.expectEqualStrings(html, output); + try std.testing.expectEqualStrings( + \\
_ _ _ _ a
+ \\a------
+ \\---a---
+ , output); } - test "Example 56" { - const alloc = std.testing.allocator; + const output = try convert(std.testing.allocator, + \\ *-* + ); + defer std.testing.allocator.free(output); - const md = ( - \\*-* - -); - const html = ( + try std.testing.expectEqualStrings( \\-
- -); - - const output = try convert(alloc, md); - defer alloc.free(output); - - try std.testing.expectEqualStrings(html, output); + , output); } - test "Example 57" { - const alloc = std.testing.allocator; + const output = try convert(std.testing.allocator, + \\- foo + \\*** + \\- bar + ); + defer std.testing.allocator.free(output); - const md = ( - \\- -); - const html = ( + try std.testing.expectEqualStrings( \\Foo
- \\bar
+ , output); } - test "Example 59" { - const alloc = std.testing.allocator; - - const md = ( + const output = try convert(std.testing.allocator, \\Foo \\--- \\bar + ); + defer std.testing.allocator.free(output); -); - const html = ( + try std.testing.expectEqualStrings( \\bar
- -); - - const output = try convert(alloc, md); - defer alloc.free(output); - - try std.testing.expectEqualStrings(html, output); + , output); } - test "Example 60" { - const alloc = std.testing.allocator; + const output = try convert(std.testing.allocator, + \\* Foo + \\* * * + \\* Bar + ); + defer std.testing.allocator.free(output); - const md = ( - \\* -); - const html = ( + try std.testing.expectEqualStrings( \\####### -); - - const output = try convert(alloc, md); - defer alloc.free(output); - - try std.testing.expectEqualStrings(html, output); + try std.testing.expectEqualStrings( + \\
####### foo
+ , output); } - test "Example 64" { - const alloc = std.testing.allocator; + const output = try convert(std.testing.allocator, + \\#5 bolt + \\ + \\#hashtag + ); + defer std.testing.allocator.free(output); - const md = ( - \\#5 -); - const html = ( - \\#5 -); - - const output = try convert(alloc, md); - defer alloc.free(output); - - try std.testing.expectEqualStrings(html, output); + try std.testing.expectEqualStrings( + \\
#5 bolt
+ \\#hashtag
+ , output); } - test "Example 65" { - const alloc = std.testing.allocator; + const output = try convert(std.testing.allocator, + \\\## foo + ); + defer std.testing.allocator.free(output); - const md = ( - \\\## -); - const html = ( - \\## -); - - const output = try convert(alloc, md); - defer alloc.free(output); - - try std.testing.expectEqualStrings(html, output); + try std.testing.expectEqualStrings( + \\
## foo
+ , output); } - test "Example 66" { - const alloc = std.testing.allocator; + const output = try convert(std.testing.allocator, + \\# foo *bar* \*baz\* + ); + defer std.testing.allocator.free(output); - const md = ( - \\# -); - const html = ( - \\#
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\# foo
+ \\
+ , output);
}
-
test "Example 70" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\foo
+ \\ # bar
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo
- \\#
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\# bar
+ , output);
}
-
test "Example 71" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\## foo ##
+ \\ ### bar ###
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\##
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo
\\bar
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 72" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\# foo ##################################
+ \\##### foo ##
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\#
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo
\\foo
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 73" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\### foo ###
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\###
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 74" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\### foo ### b
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\###
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo ### b
+ , output);
}
-
test "Example 75" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\# foo#
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\#
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo#
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 76" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\### foo \###
+ \\## foo #\##
+ \\# foo \#
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\###
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo ###
+ \\foo ###
+ \\foo #
+ , output);
}
-
test "Example 77" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\****
- \\##
-);
- const html = (
- \\
+ \\foo
+ \\
+ , output);
}
-
test "Example 78" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\Foo bar
+ \\# baz
+ \\Bar foo
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\Foo
-);
- const html = (
- \\
Foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
Foo bar
+ \\baz
+ \\Bar foo
+ , output);
}
-
test "Example 79" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\##
+ \\#
+ \\### ###
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\##
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 80" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\Foo *bar*
+ \\=========
+ \\
+ \\Foo *bar*
+ \\---------
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\Foo
-);
- const html = (
- \\Foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\Foo bar
+ \\Foo bar
+ , output);
}
-
test "Example 81" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\Foo *bar
+ \\baz*
+ \\====
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\Foo
-);
- const html = (
- \\Foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\Foo bar
+ \\baz
+ , output);
}
-
test "Example 82" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\ Foo *bar
+ \\baz*→
+ \\====
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\Foo
-);
- const html = (
- \\Foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\Foo bar
+ \\baz
+ , output);
}
-
test "Example 83" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\Foo
\\-------------------------
\\
\\Foo
\\=
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\Foo
\\Foo
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 84" {
- const alloc = std.testing.allocator;
-
- const md = (
- \\Foo
+ const output = try convert(std.testing.allocator,
+ \\ Foo
\\---
\\
+ \\ Foo
+ \\-----
+ \\
+ \\ Foo
+ \\ ===
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\Foo
\\Foo
\\Foo
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 85" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\ Foo
+ \\ ---
+ \\
+ \\ Foo
+ \\---
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\Foo
-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\Foo
\\---
\\
\\Foo
\\
- \\
+ , output);
}
-
test "Example 86" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\Foo
+ \\ ----
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\Foo
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 87" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\Foo
+ \\ ---
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
Foo
\\---
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 88" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\Foo
- \\=
-);
- const html = (
+ \\= =
+ \\
+ \\Foo
+ \\--- -
+ );
+ defer std.testing.allocator.free(output);
+
+ try std.testing.expectEqualStrings(
\\Foo
- \\=
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\= =
+ \\Foo
+ \\
+ , output);
}
-
test "Example 89" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\Foo
+ \\-----
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\Foo
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\Foo
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 90" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\Foo\
\\----
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\Foo\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 91" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\`Foo
\\----
\\`
\\
- \\
+ );
+ defer std.testing.allocator.free(output);
+
+ try std.testing.expectEqualStrings(
\\`Foo
\\`
- \\<a
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\<a title="a lot
+ \\
of dashes"/>
+ , output);
}
-
test "Example 92" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\> Foo
+ \\---
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\>
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\Foo
\\
- \\
+ , output);
}
-
test "Example 93" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\> foo
+ \\bar
+ \\===
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\>
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\foo
\\bar
\\===
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 94" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\- Foo
+ \\---
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\- Foo
\\
- \\
+ , output);
}
-
test "Example 95" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\Foo
\\Bar
\\---
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\Foo
\\Bar
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 96" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\---
\\Foo
\\---
\\Bar
\\---
\\Baz
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ \\Foo
+ \\Bar
+ \\Baz
+ , output);
}
-
test "Example 97" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
\\====
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\====
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 98" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\---
\\---
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ \\
+ , output);
}
-
test "Example 99" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\- foo
+ \\-----
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\- foo
\\
- \\
+ , output);
}
-
test "Example 100" {
- const alloc = std.testing.allocator;
-
- const md = (
- \\foo
+ const output = try convert(std.testing.allocator,
+ \\ foo
\\---
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo
\\
- \\
+ , output);
}
-
test "Example 101" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\> foo
+ \\-----
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\>
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\foo
\\
- \\
+ , output);
}
-
test "Example 102" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\\> foo
+ \\------
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\\>
-);
- const html = (
- \\>
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\> foo
+ , output);
}
-
test "Example 103" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\Foo
\\
\\bar
\\---
\\baz
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
Foo
\\bar
\\baz
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 104" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\Foo
\\bar
\\
\\---
\\
\\baz
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\Foo
\\bar
- \\
+ \\baz
+ , output);
}
-
test "Example 105" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\Foo
\\bar
- \\*
-);
- const html = (
+ \\* * *
+ \\baz
+ );
+ defer std.testing.allocator.free(output);
+
+ try std.testing.expectEqualStrings(
\\Foo
\\bar
- \\
+ \\baz
+ , output);
}
-
test "Example 106" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\Foo
\\bar
\\\---
\\baz
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\Foo
\\bar
\\---
\\baz
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 107" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\ a simple
+ \\ indented code block
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\a
-);
- const html = (
- \\a
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\a simple
+ \\ indented code block
+ \\
+ , output);
}
-
test "Example 108" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\ - foo
+ \\
+ \\ bar
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\-
\\
foo
\\bar
\\
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 109" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\1. foo
+ \\
+ \\ - bar
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\1.
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\-
\\
foo
@@ -2109,46 +1529,40 @@ test "Example 109" {
\\
\\
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 110" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\
+ \\ *hi*
+ \\
+ \\ - one
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\
-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\<a/>
\\*hi*
\\
- \\-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\- one
+ \\
+ , output);
}
-
test "Example 111" {
- const alloc = std.testing.allocator;
-
- const md = (
- \\chunk1
+ const output = try convert(std.testing.allocator,
+ \\ chunk1
\\
+ \\ chunk2
+ \\
+ \\
+ \\
+ \\ chunk3
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\chunk1
\\
\\chunk2
@@ -2157,766 +1571,565 @@ test "Example 111" {
\\
\\chunk3
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 112" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\ chunk1
+ \\
+ \\ chunk2
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\chunk1
-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\chunk1
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\
+ \\ chunk2
+ \\
+ , output);
}
-
test "Example 113" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\Foo
+ \\ bar
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\Foo
\\bar
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 114" {
- const alloc = std.testing.allocator;
-
- const md = (
- \\foo
+ const output = try convert(std.testing.allocator,
+ \\ foo
\\bar
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo
\\
\\bar
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 115" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\# Heading
+ \\ foo
+ \\Heading
+ \\------
+ \\ foo
+ \\----
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\#
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\Heading
\\foo
\\
\\Heading
\\foo
\\
- \\
+ , output);
}
-
test "Example 116" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\ foo
+ \\ bar
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\foo
-
-);
- const html = (
- \\
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\ foo
+ \\bar
+ \\
+ , output);
}
-
test "Example 117" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
+ \\
+ \\ foo
+ \\
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 118" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\ foo
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo
+ \\
+ , output);
}
-
test "Example 119" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\```
\\<
+ \\ >
+ \\```
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\<
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\ >
+ \\
+ , output);
}
-
test "Example 120" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\~~~
\\<
+ \\ >
+ \\~~~
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\<
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\ >
+ \\
+ , output);
}
-
test "Example 121" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\``
\\foo
\\``
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 122" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\```
\\aaa
\\~~~
\\```
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\aaa
\\~~~
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 123" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\~~~
\\aaa
\\```
\\~~~
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\aaa
\\```
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 124" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\````
\\aaa
\\```
\\``````
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\aaa
\\```
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 125" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\~~~~
\\aaa
\\~~~
\\~~~~
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\aaa
\\~~~
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 126" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\```
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 127" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\`````
\\
\\```
\\aaa
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\```
\\aaa
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 128" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\> ```
+ \\> aaa
+ \\
+ \\bbb
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\>
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\aaa
\\
\\
\\bbb
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 129" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\```
\\
+ \\
+ \\```
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\
+ \\
+ , output);
}
-
test "Example 130" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\```
\\```
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 131" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
+ \\ ```
+ \\ aaa
+ \\aaa
\\```
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\aaa
\\aaa
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 132" {
- const alloc = std.testing.allocator;
-
- const md = (
- \\```
+ const output = try convert(std.testing.allocator,
+ \\ ```
\\aaa
+ \\ aaa
+ \\aaa
+ \\ ```
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\aaa
\\aaa
\\aaa
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 133" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\ ```
+ \\ aaa
+ \\ aaa
+ \\ aaa
+ \\ ```
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\```
-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\aaa
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\ aaa
+ \\aaa
+ \\
+ , output);
}
-
test "Example 134" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\ ```
+ \\ aaa
+ \\ ```
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\```
-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\```
\\aaa
\\```
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 135" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\```
\\aaa
+ \\ ```
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\aaa
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 136" {
- const alloc = std.testing.allocator;
-
- const md = (
- \\```
+ const output = try convert(std.testing.allocator,
+ \\ ```
\\aaa
+ \\ ```
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\aaa
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 137" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\```
\\aaa
+ \\ ```
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\aaa
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\ ```
+ \\
+ , output);
}
-
test "Example 138" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\``` ```
+ \\aaa
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\```
-);
- const html = (
- \\
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
+ \\aaa
+ , output);
}
-
test "Example 139" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\~~~~~~
\\aaa
- \\~~~
-);
- const html = (
+ \\~~~ ~~
+ );
+ defer std.testing.allocator.free(output);
+
+ try std.testing.expectEqualStrings(
\\aaa
- \\~~~
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\~~~ ~~
+ \\
+ , output);
}
-
test "Example 140" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\foo
\\```
\\bar
\\```
\\baz
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo
\\bar
\\
\\baz
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 141" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\foo
\\---
\\~~~
\\bar
\\~~~
- \\#
-);
- const html = (
+ \\# baz
+ );
+ defer std.testing.allocator.free(output);
+
+ try std.testing.expectEqualStrings(
\\foo
\\bar
\\
\\baz
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 142" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\```ruby
- \\def
-);
- const html = (
- \\def foo(x)
+ \\ return 3
+ \\end
+ \\
+ , output);
}
-
test "Example 143" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\~~~~ ruby startline=3 $%@#$
+ \\def foo(x)
+ \\ return 3
+ \\end
+ \\~~~~~~~
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\~~~~
-);
- const html = (
- \\def foo(x)
+ \\ return 3
+ \\end
+ \\
+ , output);
}
-
test "Example 144" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\````;
\\````
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 145" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\``` aa ```
+ \\foo
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\```
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\aa
\\foo
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 146" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
+ \\~~~ aa ``` ~~~
+ \\foo
\\~~~
-);
- const html = (
- \\foo
+ \\
+ , output);
}
-
test "Example 147" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\```
+ \\``` aaa
\\```
-);
- const html = (
- \\```
-);
+ );
+ defer std.testing.allocator.free(output);
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\``` aaa
+ \\
+ , output);
}
-
test "Example 148" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
\\
\\**Hello**,
@@ -2924,452 +2137,365 @@ test "Example 148" {
\\_world_.
\\
\\
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\
\\**Hello**,
\\world.
\\
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 149" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
+ \\
+ \\
+ \\ hi
+ \\
+ \\
+ \\
+ \\
+ \\okay.
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\
+ \\
+ \\ hi
+ \\
+ \\
+ \\
+ \\okay.
+ , output);
}
-
test "Example 150" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\
+ \\ *hello*
+ \\
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\
-
-);
- const html = (
- \\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
\\*foo*
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\*foo*
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 152" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\
+ \\
+ \\*Markdown*
+ \\
+ \\
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\
+ \\Markdown
+ \\
+ , output);
}
-
test "Example 153" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\
+ , output);
}
-
test "Example 154" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\
+ , output);
}
-
test "Example 155" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
\\*foo*
\\
\\*bar*
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\*foo*
\\bar
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 156" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\
+ , output);
}
-
test "Example 160" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
\\foo
\\
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\foo
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 161" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
+ \\``` c
+ \\int x = 33;
\\```
-);
- const html = (
+ );
+ defer std.testing.allocator.free(output);
+
+ try std.testing.expectEqualStrings(
\\
+ \\``` c
+ \\int x = 33;
\\```
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 162" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\
+ \\*bar*
+ \\
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\
+ \\*bar*
+ \\
+ , output);
}
-
test "Example 163" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
\\*bar*
\\
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\*bar*
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 164" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\
+ \\*bar*
+ \\
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\
+ \\*bar*
+ \\
+ , output);
}
-
test "Example 165" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
\\*bar*
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\*bar*
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 166" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
\\*foo*
\\
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\*foo*
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 167" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
\\
\\*foo*
\\
\\
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\foo
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 168" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\*foo*
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 169" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\
+ \\import Text.HTML.TagSoup
+ \\
+ \\main :: IO ()
+ \\main = print $ parseTags tags
+ \\
+ \\okay
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\
+ \\import Text.HTML.TagSoup
+ \\
+ \\main :: IO ()
+ \\main = print $ parseTags tags
+ \\
+ \\okay
+ , output);
}
-
test "Example 170" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\
+ \\okay
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\
+ \\okay
+ , output);
}
-
test "Example 171" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 172" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
+ \\okay
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
+ \\okay
+ , output);
}
-
test "Example 173" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
\\*foo*
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\foo
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 177" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\*bar*
+ \\*baz*
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\*bar*
+ \\baz
+ , output);
}
-
test "Example 178" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\1.
-);
- const html = (
+ \\1. *bar*
+ );
+ defer std.testing.allocator.free(output);
+
+ try std.testing.expectEqualStrings(
\\1.
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\1. *bar*
+ , output);
}
-
test "Example 179" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\
+ \\okay
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\
+ \\okay
+ , output);
}
-
test "Example 180" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\';
+ \\
+ \\?>
+ \\okay
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\';
+ \\
+ \\?>
+ \\okay
+ , output);
}
-
test "Example 181" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\
+ , output);
}
-
test "Example 182" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
+ \\okay
+ );
+ defer std.testing.allocator.free(output);
+
+ try std.testing.expectEqualStrings(
\\
+ \\okay
+ , output);
}
-
test "Example 183" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\
+ \\
+ \\
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\
+ \\<!-- foo -->
+ \\
+ , output);
}
-
test "Example 184" {
- const alloc = std.testing.allocator;
-
- const md = (
- \\
+ const output = try convert(std.testing.allocator,
+ \\
\\
+ \\
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ try std.testing.expectEqualStrings(
+ \\
\\<div>
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 185" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\Foo
\\
\\bar
\\
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\Foo
\\
\\bar
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 186" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
\\bar
\\
\\*foo*
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\bar
\\
\\*foo*
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 187" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\Foo
- \\
+ \\baz
+ );
+ defer std.testing.allocator.free(output);
+
+ try std.testing.expectEqualStrings(
\\Foo
- \\
+ \\baz
+ , output);
}
-
test "Example 188" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
\\
- \\*Emphasized*
-);
- const html = (
+ \\*Emphasized* text.
+ \\
+ \\
+ );
+ defer std.testing.allocator.free(output);
+
+ try std.testing.expectEqualStrings(
\\
- \\Emphasized
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\
Emphasized text.
+ \\
+ , output);
}
-
test "Example 189" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
- \\*Emphasized*
-);
- const html = (
+ \\*Emphasized* text.
+ \\
+ );
+ defer std.testing.allocator.free(output);
+
+ try std.testing.expectEqualStrings(
\\
- \\*Emphasized*
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\*Emphasized* text.
+ \\
+ , output);
}
-
test "Example 190" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
\\
\\
@@ -3775,9 +2843,10 @@ test "Example 190" {
\\
\\
\\
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\
\\
@@ -3785,866 +2854,684 @@ test "Example 190" {
\\
\\
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 191" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
\\
+ \\
+ \\
+ \\
+ \\ Hi
+ \\
+ \\
+ \\
+ \\
+ \\
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\
+ \\<td>
+ \\ Hi
+ \\</td>
+ \\
+ \\
+ \\
+ , output);
}
-
test "Example 192" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[foo]: /url "title"
+ \\
+ \\[foo]
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[foo]:
-);
- const html = (
- \\
+ , output);
}
-
test "Example 193" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\ [foo]:
+ \\ /url
+ \\ 'the title'
+ \\
+ \\[foo]
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[foo]:
-);
- const html = (
- \\
+ , output);
}
-
test "Example 194" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[Foo*bar\]]:my_(url) 'title (with parens)'
+ \\
+ \\[Foo*bar\]]
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[Foo*bar\]]:my_(url)
-);
- const html = (
- \\
+ , output);
}
-
test "Example 195" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[Foo bar]:
+ \\
+ \\'title'
+ \\
+ \\[Foo bar]
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[Foo
-);
- const html = (
- \\
+ , output);
}
-
test "Example 196" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[foo]: /url '
+ \\title
+ \\line1
+ \\line2
+ \\'
+ \\
+ \\[foo]
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[foo]:
-);
- const html = (
- \\
+ , output);
}
-
test "Example 197" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[foo]: /url 'title
+ \\
+ \\with blank line'
+ \\
+ \\[foo]
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[foo]:
-);
- const html = (
- \\[foo]:
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
[foo]: /url 'title
+ \\with blank line'
+ \\[foo]
+ , output);
}
-
test "Example 198" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[foo]:
\\/url
\\
\\[foo]
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 199" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[foo]:
\\
\\[foo]
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\[foo]:
\\[foo]
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 200" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[foo]: <>
+ \\
+ \\[foo]
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[foo]:
-);
- const html = (
- \\
+ , output);
}
-
test "Example 201" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[foo]: (baz)
+ \\
+ \\[foo]
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[foo]:
-);
- const html = (
- \\[foo]:
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
[foo]: (baz)
+ \\[foo]
+ , output);
}
-
test "Example 202" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[foo]: /url\bar\*baz "foo\"bar\baz"
+ \\
+ \\[foo]
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[foo]:
-);
- const html = (
- \\
+ , output);
}
-
test "Example 203" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[foo]
\\
- \\[foo]:
-);
- const html = (
- \\
+ , output);
}
-
test "Example 204" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[foo]
\\
- \\[foo]:
-);
- const html = (
- \\
+ , output);
}
-
test "Example 205" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[FOO]: /url
+ \\
+ \\[Foo]
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[FOO]:
-);
- const html = (
- \\
+ , output);
}
-
test "Example 206" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[ΑΓΩ]: /φου
+ \\
+ \\[αγω]
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[ΑΓΩ]:
-);
- const html = (
- \\
+ , output);
}
-
test "Example 207" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[foo]: /url
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[foo]:
-);
- const html = (
-""
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings("", output);
}
-
test "Example 208" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[
\\foo
- \\]:
-);
- const html = (
+ \\]: /url
+ \\bar
+ );
+ defer std.testing.allocator.free(output);
+
+ try std.testing.expectEqualStrings(
\\bar
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 209" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[foo]: /url "title" ok
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[foo]:
-);
- const html = (
- \\[foo]:
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
[foo]: /url "title" ok
+ , output);
}
-
test "Example 210" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[foo]: /url
+ \\"title" ok
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[foo]:
-);
- const html = (
- \\"title"
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
"title" ok
+ , output);
}
-
test "Example 211" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\ [foo]: /url "title"
+ \\
+ \\[foo]
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[foo]:
-);
- const html = (
- \\[foo]:
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\[foo]: /url "title"
+ \\
+ \\[foo]
+ , output);
}
-
test "Example 212" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\```
- \\[foo]:
-);
- const html = (
- \\[foo]:
-);
+ \\[foo]: /url
+ \\```
+ \\
+ \\[foo]
+ );
+ defer std.testing.allocator.free(output);
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\[foo]: /url
+ \\
+ \\[foo]
+ , output);
}
-
test "Example 213" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\Foo
- \\[bar]:
-);
- const html = (
+ \\[bar]: /baz
+ \\
+ \\[bar]
+ );
+ defer std.testing.allocator.free(output);
+
+ try std.testing.expectEqualStrings(
\\Foo
- \\[bar]:
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\[bar]: /baz
+ \\[bar]
+ , output);
}
-
test "Example 214" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\# [Foo]
+ \\[foo]: /url
+ \\> bar
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\#
-);
- const html = (
- \\Foo
+ \\
+ \\bar
+ \\
+ , output);
}
-
test "Example 215" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[foo]: /url
+ \\bar
+ \\===
+ \\[foo]
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[foo]:
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\bar
- \\
+ , output);
}
-
test "Example 216" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[foo]: /url
+ \\===
+ \\[foo]
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[foo]:
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\===
- \\foo
+ , output);
}
-
test "Example 217" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[foo]: /foo-url "foo"
+ \\[bar]: /bar-url
+ \\ "bar"
+ \\[baz]: /baz-url
+ \\
+ \\[foo],
+ \\[bar],
+ \\[baz]
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[foo]:
-);
- const html = (
- \\
+ , output);
}
-
test "Example 218" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[foo]
\\
- \\>
-);
- const html = (
- \\
\\
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 271" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\ 10. foo
+ \\
+ \\ bar
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\10.
-);
- const html = (
- \\
+ \\-
+ \\
foo
+ \\bar
+ \\
+ \\
+ \\
+ , output);
}
-
test "Example 272" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\ indented code
+ \\
+ \\paragraph
+ \\
+ \\ more code
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\indented
-);
- const html = (
- \\indented
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\indented code
+ \\
+ \\paragraph
+ \\more code
+ \\
+ , output);
}
-
test "Example 273" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\1. indented code
+ \\
+ \\ paragraph
+ \\
+ \\ more code
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\1.
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\-
- \\
indented
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\indented code
+ \\
+ \\paragraph
+ \\more code
+ \\
+ \\
+ \\
+ , output);
}
-
test "Example 274" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\1. indented code
+ \\
+ \\ paragraph
+ \\
+ \\ more code
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\1.
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\-
- \\
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\ indented code
+ \\
+ \\paragraph
+ \\more code
+ \\
+ \\
+ \\
+ , output);
}
-
test "Example 275" {
- const alloc = std.testing.allocator;
-
- const md = (
- \\foo
+ const output = try convert(std.testing.allocator,
+ \\ foo
\\
\\bar
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo
\\bar
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 276" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\- foo
+ \\
+ \\ bar
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\- foo
\\
\\bar
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 277" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\- foo
+ \\
+ \\ bar
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\-
\\
foo
\\bar
\\
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 278" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\-
+ \\ foo
+ \\-
+ \\ ```
+ \\ bar
+ \\ ```
+ \\-
+ \\ baz
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\- foo
\\-
@@ -5572,334 +4305,314 @@ test "Example 278" {
\\
\\
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 279" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\-
+ \\ foo
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\- foo
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 280" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\-
\\
+ \\ foo
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\
\\
\\foo
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 281" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
+ \\- foo
\\-
-);
- const html = (
+ \\- bar
+ );
+ defer std.testing.allocator.free(output);
+
+ try std.testing.expectEqualStrings(
\\
\\- foo
\\
\\- bar
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 282" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\- foo
+ \\-
+ \\- bar
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\- foo
\\
\\- bar
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 283" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\1. foo
+ \\2.
+ \\3. bar
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\1.
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\- foo
\\
\\- bar
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 284" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\*
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 285" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\foo
\\*
\\
\\foo
\\1.
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo
\\*
\\foo
\\1.
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 286" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\ 1. A paragraph
+ \\ with two lines.
+ \\
+ \\ indented code
+ \\
+ \\ > A block quote.
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\1.
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\-
- \\
A
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\
A paragraph
+ \\with two lines.
+ \\indented code
+ \\
+ \\
+ \\A block quote.
+ \\
+ \\
+ \\
+ , output);
}
-
test "Example 287" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\ 1. A paragraph
+ \\ with two lines.
+ \\
+ \\ indented code
+ \\
+ \\ > A block quote.
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\1.
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\-
- \\
A
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\
A paragraph
+ \\with two lines.
+ \\indented code
+ \\
+ \\
+ \\A block quote.
+ \\
+ \\
+ \\
+ , output);
}
-
test "Example 288" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\ 1. A paragraph
+ \\ with two lines.
+ \\
+ \\ indented code
+ \\
+ \\ > A block quote.
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\1.
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\-
- \\
A
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\
A paragraph
+ \\with two lines.
+ \\indented code
+ \\
+ \\
+ \\A block quote.
+ \\
+ \\
+ \\
+ , output);
}
-
test "Example 289" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\ 1. A paragraph
+ \\ with two lines.
+ \\
+ \\ indented code
+ \\
+ \\ > A block quote.
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\1.
-);
- const html = (
- \\1.
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\1. A paragraph
+ \\ with two lines.
+ \\
+ \\ indented code
+ \\
+ \\ > A block quote.
+ \\
+ , output);
}
-
test "Example 290" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\ 1. A paragraph
+ \\with two lines.
+ \\
+ \\ indented code
+ \\
+ \\ > A block quote.
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\1.
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\-
- \\
A
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\
A paragraph
+ \\with two lines.
+ \\indented code
+ \\
+ \\
+ \\A block quote.
+ \\
+ \\
+ \\
+ , output);
}
-
test "Example 291" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\ 1. A paragraph
+ \\ with two lines.
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\1.
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
- \\- A
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\
- A paragraph
+ \\with two lines.
+ \\
+ , output);
}
-
test "Example 292" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\> 1. > Blockquote
+ \\continued here.
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\>
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\
\\-
\\
\\Blockquote
- \\continued
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\continued here.
+ \\
+ \\
+ \\
+ \\
+ , output);
}
-
test "Example 293" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\> 1. > Blockquote
+ \\> continued here.
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\>
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\
\\-
\\
\\Blockquote
- \\continued
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\continued here.
+ \\
+ \\
+ \\
+ \\
+ , output);
}
-
test "Example 294" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\- foo
+ \\ - bar
+ \\ - baz
+ \\ - boo
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\- foo
\\
@@ -5915,80 +4628,70 @@ test "Example 294" {
\\
\\
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 295" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\- foo
+ \\ - bar
+ \\ - baz
+ \\ - boo
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\- foo
\\- bar
\\- baz
\\- boo
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 296" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\10) foo
+ \\ - bar
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\10)
-);
- const html = (
- \\
+ \\- foo
+ \\
+ \\- bar
+ \\
+ \\
+ \\
+ , output);
}
-
test "Example 297" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\10) foo
+ \\ - bar
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\10)
-);
- const html = (
- \\
+ \\- foo
+ \\
+ \\
+ \\- bar
+ \\
+ , output);
}
-
test "Example 298" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\- - foo
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\-
\\
@@ -5996,44 +4699,40 @@ test "Example 298" {
\\
\\
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 299" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\1. - 2. foo
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\1.
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\-
\\
\\-
- \\
+ \\- foo
+ \\
+ \\
+ \\
+ \\
+ \\
+ , output);
}
-
test "Example 300" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\- # Foo
+ \\- Bar
+ \\ ---
+ \\ baz
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\-
\\
Foo
@@ -6042,23 +4741,18 @@ test "Example 300" {
\\Bar
\\baz
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 301" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\- foo
+ \\- bar
+ \\+ baz
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\- foo
\\- bar
@@ -6066,101 +4760,85 @@ test "Example 301" {
\\
\\- baz
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 302" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\1. foo
+ \\2. bar
+ \\3) baz
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\1.
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\- foo
\\- bar
\\
- \\
+ \\- baz
+ \\
+ , output);
}
-
test "Example 303" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\Foo
- \\-
-);
- const html = (
+ \\- bar
+ \\- baz
+ );
+ defer std.testing.allocator.free(output);
+
+ try std.testing.expectEqualStrings(
\\Foo
\\
\\- bar
\\- baz
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 304" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\The number of windows in my house is
+ \\14. The number of doors is 6.
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\The
-);
- const html = (
- \\The
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
The number of windows in my house is
+ \\14. The number of doors is 6.
+ , output);
}
-
test "Example 305" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\The number of windows in my house is
+ \\1. The number of doors is 6.
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\The
-);
- const html = (
- \\The
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
The number of windows in my house is
+ \\
+ \\- The number of doors is 6.
+ \\
+ , output);
}
-
test "Example 306" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\- foo
+ \\
+ \\- bar
+ \\
+ \\
+ \\- baz
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\-
\\
foo
@@ -6172,23 +4850,21 @@ test "Example 306" {
\\baz
\\
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 307" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\- foo
+ \\ - bar
+ \\ - baz
+ \\
+ \\
+ \\ bim
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\- foo
\\
@@ -6203,44 +4879,49 @@ test "Example 307" {
\\
\\
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 308" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\- foo
+ \\- bar
+ \\
+ \\
+ \\
+ \\- baz
+ \\- bim
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\- foo
\\- bar
\\
- \\
+ \\
+ \\- baz
+ \\- bim
+ \\
+ , output);
}
-
test "Example 309" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\- foo
+ \\
+ \\ notcode
+ \\
+ \\- foo
+ \\
+ \\
+ \\
+ \\ code
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\-
\\
foo
@@ -6250,23 +4931,25 @@ test "Example 309" {
\\foo
\\
\\
- \\
+ \\
code
+ \\
+ , output);
}
-
test "Example 310" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\- a
+ \\ - b
+ \\ - c
+ \\ - d
+ \\ - e
+ \\ - f
+ \\- g
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\- a
\\- b
@@ -6276,23 +4959,20 @@ test "Example 310" {
\\- f
\\- g
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 311" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\1. a
+ \\
+ \\ 2. b
+ \\
+ \\ 3. c
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\1.
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\-
\\
a
@@ -6304,45 +4984,41 @@ test "Example 311" {
\\c
\\
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 312" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\- a
+ \\ - b
+ \\ - c
+ \\ - d
+ \\ - e
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\- a
\\- b
\\- c
\\- d
- \\-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\- e
+ \\
+ , output);
}
-
test "Example 313" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\1. a
+ \\
+ \\ 2. b
+ \\
+ \\ 3. c
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\1.
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\-
\\
a
@@ -6351,23 +5027,21 @@ test "Example 313" {
\\b
\\
\\
- \\3.
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\3. c
+ \\
+ , output);
}
-
test "Example 314" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\- a
+ \\- b
+ \\
+ \\- c
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\-
\\
a
@@ -6379,23 +5053,19 @@ test "Example 314" {
\\c
\\
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 315" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
+ \\* a
\\*
-);
- const html = (
+ \\
+ \\* c
+ );
+ defer std.testing.allocator.free(output);
+
+ try std.testing.expectEqualStrings(
\\
\\-
\\
a
@@ -6405,23 +5075,20 @@ test "Example 315" {
\\c
\\
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 316" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\- a
+ \\- b
+ \\
+ \\ c
+ \\- d
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\-
\\
a
@@ -6434,23 +5101,20 @@ test "Example 316" {
\\d
\\
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 317" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\- a
+ \\- b
+ \\
+ \\ [ref]: /url
+ \\- d
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\-
\\
a
@@ -6462,23 +5126,22 @@ test "Example 317" {
\\d
\\
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 318" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\- a
+ \\- ```
+ \\ b
+ \\
+ \\
+ \\ ```
+ \\- c
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\- a
\\-
@@ -6489,23 +5152,20 @@ test "Example 318" {
\\
\\- c
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 319" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\- a
+ \\ - b
+ \\
+ \\ c
+ \\- d
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\- a
\\
@@ -6517,23 +5177,19 @@ test "Example 319" {
\\
\\- d
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 320" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\* a
+ \\ > b
+ \\ >
+ \\* c
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\*
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\- a
\\
@@ -6542,23 +5198,21 @@ test "Example 320" {
\\
\\- c
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 321" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\- a
+ \\ > b
+ \\ ```
+ \\ c
+ \\ ```
+ \\- d
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\- a
\\
@@ -6569,43 +5223,30 @@ test "Example 321" {
\\
\\- d
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 322" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\- a
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\- a
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 323" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\- a
+ \\ - b
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\- a
\\
@@ -6613,23 +5254,20 @@ test "Example 323" {
\\
\\
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 324" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\1. ```
+ \\ foo
+ \\ ```
+ \\
+ \\ bar
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\1.
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\-
\\
foo
@@ -6637,23 +5275,19 @@ test "Example 324" {
\\bar
\\
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 325" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\* foo
+ \\ * bar
+ \\
+ \\ baz
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\*
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\-
\\
foo
@@ -6663,23 +5297,22 @@ test "Example 325" {
\\baz
\\
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 326" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\- a
+ \\ - b
+ \\ - c
+ \\
+ \\- d
+ \\ - e
+ \\ - f
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\-
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
\\-
\\
a
@@ -6696,5904 +5329,3818 @@ test "Example 326" {
\\
\\
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 327" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\`hi`lo`
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\hi
lo`
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 328" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\`foo`
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 329" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\`` foo ` bar ``
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\``
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo ` bar
+ , output);
}
-
test "Example 330" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\` `` `
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\`
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\``
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 331" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\` `` `
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\`
-);
- const html = (
- \\
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\ ``
+ , output);
}
-
test "Example 332" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\` a`
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\`
-);
- const html = (
- \\
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\ a
+ , output);
}
-
test "Example 333" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\` b `
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\ b
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 334" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\` `
- \\`
-);
- const html = (
+ \\` `
+ );
+ defer std.testing.allocator.free(output);
+
+ try std.testing.expectEqualStrings(
\\
- \\
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\
+ , output);
}
-
test "Example 335" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\``
\\foo
- \\bar
-);
- const html = (
- \\foo
-);
+ \\bar
+ \\baz
+ \\``
+ );
+ defer std.testing.allocator.free(output);
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo bar baz
+ , output);
}
-
test "Example 336" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\``
- \\foo
-);
- const html = (
- \\foo
-);
+ \\foo
+ \\``
+ );
+ defer std.testing.allocator.free(output);
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo
+ , output);
}
-
test "Example 337" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\`foo bar
+ \\baz`
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\`foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo bar baz
+ , output);
}
-
test "Example 338" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\`foo\`bar`
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo\
bar`
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 339" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\``foo`bar``
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo`bar
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 340" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\` foo `` bar `
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\`
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo `` bar
+ , output);
}
-
test "Example 341" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\*foo`*`
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\*foo*
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 342" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[not a `link](/foo`)
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[not
-);
- const html = (
- \\[not
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
[not a link](/foo
)
+ , output);
}
-
test "Example 343" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\``
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\`<a
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\<a href="
">`
+ , output);
}
-
test "Example 344" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\`
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\`
+ , output);
}
-
test "Example 345" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\``
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\<https://foo.bar.
baz>`
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 346" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\`
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 347" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\```foo``
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\```foo``
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 348" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\`foo
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\`foo
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 349" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\`foo``bar``
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\`foobar
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 350" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\*foo bar*
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\*foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo bar
+ , output);
}
-
test "Example 351" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\a * foo bar*
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\a
-);
- const html = (
- \\a
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
a * foo bar*
+ , output);
}
-
test "Example 352" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\a*"foo"*
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\a*"foo"*
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 353" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\* a *
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\* a *
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 354" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\*$*alpha.
\\
\\*£*bravo.
\\
\\*€*charlie.
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\*$*alpha.
\\*£*bravo.
\\*€*charlie.
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 355" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\foo*bar*
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foobar
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 356" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\5*6*78
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\5678
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 357" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\_foo bar_
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\_foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo bar
+ , output);
}
-
test "Example 358" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\_ foo bar_
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\_
-);
- const html = (
- \\_
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
_ foo bar_
+ , output);
}
-
test "Example 359" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\a_"foo"_
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\a_"foo"_
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 360" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\foo_bar_
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo_bar_
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 361" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\5_6_78
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\5_6_78
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 362" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\пристаням_стремятся_
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\пристаням_стремятся_
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 363" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\aa_"bb"_cc
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\aa_"bb"_cc
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 364" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\foo-_(bar)_
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo-(bar)
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 365" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\_foo*
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\_foo*
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 366" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\*foo bar *
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\*foo
-);
- const html = (
- \\*foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
*foo bar *
+ , output);
}
-
test "Example 367" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\*foo bar
+ \\*
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\*foo
-);
- const html = (
- \\*foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
*foo bar
+ \\*
+ , output);
}
-
test "Example 368" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\*(*foo)
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\*(*foo)
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 369" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\*(*foo*)*
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\(foo)
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 370" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\*foo*bar
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foobar
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 371" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\_foo bar _
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\_foo
-);
- const html = (
- \\_foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
_foo bar _
+ , output);
}
-
test "Example 372" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\_(_foo)
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\_(_foo)
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 373" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\_(_foo_)_
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\(foo)
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 374" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\_foo_bar
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\_foo_bar
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 375" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\_пристаням_стремятся
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\_пристаням_стремятся
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 376" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\_foo_bar_baz_
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo_bar_baz
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 377" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\_(bar)_.
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\(bar).
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 378" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\**foo bar**
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\**foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo bar
+ , output);
}
-
test "Example 379" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\** foo bar**
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\**
-);
- const html = (
- \\**
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
** foo bar**
+ , output);
}
-
test "Example 380" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\a**"foo"**
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\a**"foo"**
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 381" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\foo**bar**
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foobar
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 382" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\__foo bar__
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\__foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo bar
+ , output);
}
-
test "Example 383" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\__ foo bar__
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\__
-);
- const html = (
- \\__
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
__ foo bar__
+ , output);
}
-
test "Example 384" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\__
- \\foo
-);
- const html = (
+ \\foo bar__
+ );
+ defer std.testing.allocator.free(output);
+
+ try std.testing.expectEqualStrings(
\\__
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\foo bar__
+ , output);
}
-
test "Example 385" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\a__"foo"__
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\a__"foo"__
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 386" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\foo__bar__
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo__bar__
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 387" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\5__6__78
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\5__6__78
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 388" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\пристаням__стремятся__
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\пристаням__стремятся__
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 389" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\__foo, __bar__, baz__
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\__foo,
-);
- const html = (
- \\foo,
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo, bar, baz
+ , output);
}
-
test "Example 390" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\foo-__(bar)__
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo-(bar)
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 391" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\**foo bar **
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\**foo
-);
- const html = (
- \\**foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
**foo bar **
+ , output);
}
-
test "Example 392" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\**(**foo)
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\**(**foo)
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 393" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\*(**foo**)*
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\(foo)
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 394" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\**Gomphocarpus (*Gomphocarpus physocarpus*, syn.
+ \\*Asclepias physocarpa*)**
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\**Gomphocarpus
-);
- const html = (
- \\Gomphocarpus
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\Gomphocarpus (Gomphocarpus physocarpus, syn.
+ \\Asclepias physocarpa)
+ , output);
}
-
test "Example 395" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\**foo "*bar*" foo**
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\**foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo "bar" foo
+ , output);
}
-
test "Example 396" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\**foo**bar
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foobar
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 397" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\__foo bar __
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\__foo
-);
- const html = (
- \\__foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
__foo bar __
+ , output);
}
-
test "Example 398" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\__(__foo)
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\__(__foo)
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 399" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\_(__foo__)_
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\(foo)
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 400" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\__foo__bar
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\__foo__bar
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 401" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\__пристаням__стремятся
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\__пристаням__стремятся
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 402" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\__foo__bar__baz__
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo__bar__baz
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 403" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\__(bar)__.
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\(bar).
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 404" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\*foo [bar](/url)*
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\*foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo bar
+ , output);
}
-
test "Example 405" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\*foo
\\bar*
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo
\\bar
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 406" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\_foo __bar__ baz_
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\_foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo bar baz
+ , output);
}
-
test "Example 407" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\_foo _bar_ baz_
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\_foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo bar baz
+ , output);
}
-
test "Example 408" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\__foo_ bar_
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\__foo_
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo bar
+ , output);
}
-
test "Example 409" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\*foo *bar**
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\*foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo bar
+ , output);
}
-
test "Example 410" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\*foo **bar** baz*
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\*foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo bar baz
+ , output);
}
-
test "Example 411" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\*foo**bar**baz*
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foobarbaz
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 412" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\*foo**bar*
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo**bar
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 413" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\***foo** bar*
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\***foo**
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo bar
+ , output);
}
-
test "Example 414" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\*foo **bar***
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\*foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo bar
+ , output);
}
-
test "Example 415" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\*foo**bar***
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foobar
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 416" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\foo***bar***baz
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foobarbaz
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 417" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\foo******bar*********baz
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foobar***baz
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 418" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\*foo **bar *baz* bim** bop*
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\*foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo bar baz bim bop
+ , output);
}
-
test "Example 419" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\*foo [*bar*](/url)*
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\*foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo bar
+ , output);
}
-
test "Example 420" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\** is not an empty emphasis
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\**
-);
- const html = (
- \\**
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
** is not an empty emphasis
+ , output);
}
-
test "Example 421" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\**** is not an empty strong emphasis
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\****
-);
- const html = (
- \\****
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
**** is not an empty strong emphasis
+ , output);
}
-
test "Example 422" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\**foo [bar](/url)**
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\**foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo bar
+ , output);
}
-
test "Example 423" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\**foo
\\bar**
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo
\\bar
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 424" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\__foo _bar_ baz__
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\__foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo bar baz
+ , output);
}
-
test "Example 425" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\__foo __bar__ baz__
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\__foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo bar baz
+ , output);
}
-
test "Example 426" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\____foo__ bar__
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\____foo__
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo bar
+ , output);
}
-
test "Example 427" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\**foo **bar****
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\**foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo bar
+ , output);
}
-
test "Example 428" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\**foo *bar* baz**
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\**foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo bar baz
+ , output);
}
-
test "Example 429" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\**foo*bar*baz**
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foobarbaz
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 430" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\***foo* bar**
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\***foo*
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo bar
+ , output);
}
-
test "Example 431" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\**foo *bar***
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\**foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo bar
+ , output);
}
-
test "Example 432" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\**foo *bar **baz**
+ \\bim* bop**
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\**foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo bar baz
+ \\bim bop
+ , output);
}
-
test "Example 433" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\**foo [*bar*](/url)**
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\**foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo bar
+ , output);
}
-
test "Example 434" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\__ is not an empty emphasis
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\__
-);
- const html = (
- \\__
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
__ is not an empty emphasis
+ , output);
}
-
test "Example 435" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\____ is not an empty strong emphasis
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\____
-);
- const html = (
- \\____
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
____ is not an empty strong emphasis
+ , output);
}
-
test "Example 436" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\foo ***
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
foo ***
+ , output);
}
-
test "Example 437" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\foo *\**
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
foo *
+ , output);
}
-
test "Example 438" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\foo *_*
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
foo _
+ , output);
}
-
test "Example 439" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\foo *****
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
foo *****
+ , output);
}
-
test "Example 440" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\foo **\***
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
foo *
+ , output);
}
-
test "Example 441" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\foo **_**
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
foo _
+ , output);
}
-
test "Example 442" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\**foo*
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\*foo
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 443" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\*foo**
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo*
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 444" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\***foo**
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\*foo
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 445" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\****foo*
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\***foo
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 446" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\**foo***
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo*
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 447" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\*foo****
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo***
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 448" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\foo ___
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
foo ___
+ , output);
}
-
test "Example 449" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\foo _\__
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
foo _
+ , output);
}
-
test "Example 450" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\foo _*_
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
foo *
+ , output);
}
-
test "Example 451" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\foo _____
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
foo _____
+ , output);
}
-
test "Example 452" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\foo __\___
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
foo _
+ , output);
}
-
test "Example 453" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\foo __*__
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
foo *
+ , output);
}
-
test "Example 454" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\__foo_
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\_foo
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 455" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\_foo__
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo_
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 456" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\___foo__
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\_foo
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 457" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\____foo_
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\___foo
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 458" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\__foo___
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo_
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 459" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\_foo____
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo___
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 460" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\**foo**
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 461" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\*_foo_*
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 462" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\__foo__
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 463" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\_*foo*_
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 464" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\****foo****
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 465" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\____foo____
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 466" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\******foo******
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 467" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\***foo***
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 468" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\_____foo_____
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 469" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\*foo _bar* baz_
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\*foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo _bar baz_
+ , output);
}
-
test "Example 470" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\*foo __bar *baz bim__ bam*
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\*foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo bar *baz bim bam
+ , output);
}
-
test "Example 471" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\**foo **bar baz**
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\**foo
-);
- const html = (
- \\**foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
**foo bar baz
+ , output);
}
-
test "Example 472" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\*foo *bar baz*
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\*foo
-);
- const html = (
- \\*foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
*foo bar baz
+ , output);
}
-
test "Example 473" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\*[bar*](/url)
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 474" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\_foo [bar_](/url)
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\_foo
-);
- const html = (
- \\_foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
_foo bar_
+ , output);
}
-
test "Example 475" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\*
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\*
*
*
+ , output);
}
-
test "Example 476" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\**
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\******
+ , output);
}
-
test "Example 477" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\__
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\______
+ , output);
}
-
test "Example 478" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\*a `*`*
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\*a
-);
- const html = (
- \\a
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\a *
+ , output);
}
-
test "Example 479" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\_a `_`_
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\_a
-);
- const html = (
- \\a
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\a _
+ , output);
}
-
test "Example 480" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\**a
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 481" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\__a
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 482" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[link](/uri "title")
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[link](/uri
-);
- const html = (
- \\
+ , output);
}
-
test "Example 483" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[link](/uri)
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 484" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[](./target.md)
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 485" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[link]()
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 486" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[link](<>)
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 487" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[]()
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 488" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[link](/my uri)
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[link](/my
-);
- const html = (
- \\[link](/my
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
[link](/my uri)
+ , output);
}
-
test "Example 489" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[link](
)
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[link](link
+ , output);
}
-
test "Example 490" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[link](foo
\\bar)
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\[link](foo
\\bar)
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 491" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[link]()
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\[link]()
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 492" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[a]()
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 493" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[link]()
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\[link](<foo>)
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 494" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[a](
\\[a](c)
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\[a](<b)c
\\[a](<b)c>
\\[a](c)
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 495" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[link](\(foo\))
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 496" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[link](foo(and(bar)))
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 497" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[link](foo(and(bar))
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\[link](foo(and(bar))
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 498" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[link](foo\(and\(bar\))
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 499" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[link]()
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 500" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[link](foo\)\:)
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 501" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[link](#fragment)
\\
\\[link](https://example.com#fragment)
\\
\\[link](https://example.com?foo=3#frag)
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ \\
+ \\
+ , output);
}
-
test "Example 502" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[link](foo\bar)
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 503" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[link](foo%20bä)
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 504" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[link]("title")
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 505" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[link](/url "title")
+ \\[link](/url 'title')
+ \\[link](/url (title))
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[link](/url
-);
- const html = (
- \\
+ , output);
}
-
test "Example 506" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[link](/url "title \""")
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[link](/url
-);
- const html = (
- \\
+ , output);
}
-
test "Example 507" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[link](/url "title")
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 508" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[link](/url "title "and" title")
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[link](/url
-);
- const html = (
- \\[link](/url
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
[link](/url "title "and" title")
+ , output);
}
-
test "Example 509" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[link](/url 'title "and" title')
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[link](/url
-);
- const html = (
- \\
+ , output);
}
-
test "Example 510" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[link]( /uri
+ \\ "title" )
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[link](
-);
- const html = (
- \\
+ , output);
}
-
test "Example 511" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[link] (/uri)
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[link]
-);
- const html = (
- \\[link]
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
[link] (/uri)
+ , output);
}
-
test "Example 512" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[link [foo [bar]]](/uri)
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[link
-);
- const html = (
- \\
+ , output);
}
-
test "Example 513" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[link] bar](/uri)
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[link]
-);
- const html = (
- \\[link]
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
[link] bar](/uri)
+ , output);
}
-
test "Example 514" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[link [bar](/uri)
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[link
-);
- const html = (
- \\[link
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
[link bar
+ , output);
}
-
test "Example 515" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[link \[bar](/uri)
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[link
-);
- const html = (
- \\
+ , output);
}
-
test "Example 516" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[link *foo **bar** `#`*](/uri)
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[link
-);
- const html = (
- \\
+ , output);
}
-
test "Example 517" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[](/uri)
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 518" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[foo [bar](/uri)](/uri)
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[foo
-);
- const html = (
- \\[foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
[foo bar](/uri)
+ , output);
}
-
test "Example 519" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[foo *[bar [baz](/uri)](/uri)*](/uri)
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[foo
-);
- const html = (
- \\[foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
[foo [bar baz](/uri)](/uri)
+ , output);
}
-
test "Example 520" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\](uri2)](uri3)
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\![]()
](uri3)
+ , output);
}
-
test "Example 521" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\*[foo*](/uri)
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 522" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[foo *bar](baz*)
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[foo
-);
- const html = (
- \\
+ , output);
}
-
test "Example 523" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\*foo [bar* baz]
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\*foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\foo [bar baz]
+ , output);
}
-
test "Example 524" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[foo
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[foo
-);
- const html = (
- \\[foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
[foo
+ , output);
}
-
test "Example 525" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[foo`](/uri)`
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\[foo](/uri)
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 526" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[foo
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\[foo[foohttps://example.com/?search=](uri)
+ , output);
}
-
test "Example 527" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[foo][bar]
\\
- \\[bar]:
-);
- const html = (
- \\
+ , output);
}
-
test "Example 528" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[link [foo [bar]]][ref]
+ \\
+ \\[ref]: /uri
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[link
-);
- const html = (
- \\
+ , output);
}
-
test "Example 529" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[link \[bar][ref]
+ \\
+ \\[ref]: /uri
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[link
-);
- const html = (
- \\
+ , output);
}
-
test "Example 530" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[link *foo **bar** `#`*][ref]
+ \\
+ \\[ref]: /uri
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[link
-);
- const html = (
- \\
+ , output);
}
-
test "Example 531" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[][ref]
\\
- \\[ref]:
-);
- const html = (
- \\
+ , output);
}
-
test "Example 532" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[foo [bar](/uri)][ref]
+ \\
+ \\[ref]: /uri
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[foo
-);
- const html = (
- \\[foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
+ , output);
}
-
test "Example 533" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[foo *bar [baz][ref]*][ref]
+ \\
+ \\[ref]: /uri
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[foo
-);
- const html = (
- \\[foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
+ , output);
}
-
test "Example 534" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\*[foo*][ref]
\\
- \\[ref]:
-);
- const html = (
- \\
+ , output);
}
-
test "Example 535" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[foo *bar][ref]*
+ \\
+ \\[ref]: /uri
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[foo
-);
- const html = (
- \\
+ , output);
}
-
test "Example 536" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[foo
+ \\
+ \\[ref]: /uri
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[foo
-);
- const html = (
- \\[foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
[foo
+ , output);
}
-
test "Example 537" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[foo`][ref]`
\\
- \\[ref]:
-);
- const html = (
+ \\[ref]: /uri
+ );
+ defer std.testing.allocator.free(output);
+
+ try std.testing.expectEqualStrings(
\\[foo][ref]
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 538" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[foo
\\
- \\[ref]:
-);
- const html = (
- \\[foo[foohttps://example.com/?search=][ref]
+ , output);
}
-
test "Example 539" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[foo][BaR]
\\
- \\[bar]:
-);
- const html = (
- \\
+ , output);
}
-
test "Example 540" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[ẞ]
\\
- \\[SS]:
-);
- const html = (
- \\
+ , output);
}
-
test "Example 541" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[Foo
+ \\ bar]: /url
+ \\
+ \\[Baz][Foo bar]
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 542" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[foo] [bar]
+ \\
+ \\[bar]: /url "title"
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[foo]
-);
- const html = (
- \\[foo]
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
[foo] bar
+ , output);
}
-
test "Example 543" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[foo]
\\[bar]
\\
- \\[bar]:
-);
- const html = (
+ \\[bar]: /url "title"
+ );
+ defer std.testing.allocator.free(output);
+
+ try std.testing.expectEqualStrings(
\\[foo]
- \\bar
+ , output);
}
-
test "Example 544" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[foo]: /url1
+ \\
+ \\[foo]: /url2
+ \\
+ \\[bar][foo]
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[foo]:
-);
- const html = (
- \\
+ , output);
}
-
test "Example 545" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[bar][foo\!]
\\
- \\[foo!]:
-);
- const html = (
+ \\[foo!]: /url
+ );
+ defer std.testing.allocator.free(output);
+
+ try std.testing.expectEqualStrings(
\\[bar][foo!]
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 546" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[foo][ref[]
\\
- \\[ref[]:
-);
- const html = (
+ \\[ref[]: /uri
+ );
+ defer std.testing.allocator.free(output);
+
+ try std.testing.expectEqualStrings(
\\[foo][ref[]
- \\[ref[]:
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\
[ref[]: /uri
+ , output);
}
-
test "Example 547" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[foo][ref[bar]]
\\
- \\[ref[bar]]:
-);
- const html = (
+ \\[ref[bar]]: /uri
+ );
+ defer std.testing.allocator.free(output);
+
+ try std.testing.expectEqualStrings(
\\[foo][ref[bar]]
- \\[ref[bar]]:
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\
[ref[bar]]: /uri
+ , output);
}
-
test "Example 548" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[[[foo]]]
\\
- \\[[[foo]]]:
-);
- const html = (
+ \\[[[foo]]]: /url
+ );
+ defer std.testing.allocator.free(output);
+
+ try std.testing.expectEqualStrings(
\\[[[foo]]]
- \\[[[foo]]]:
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\
[[[foo]]]: /url
+ , output);
}
-
test "Example 549" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[foo][ref\[]
\\
- \\[ref\[]:
-);
- const html = (
- \\
+ , output);
}
-
test "Example 550" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[bar\\]: /uri
+ \\
+ \\[bar\\]
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[bar\\]:
-);
- const html = (
- \\
+ , output);
}
-
test "Example 551" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[]
\\
- \\[]:
-);
- const html = (
+ \\[]: /uri
+ );
+ defer std.testing.allocator.free(output);
+
+ try std.testing.expectEqualStrings(
\\[]
- \\[]:
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\
[]: /uri
+ , output);
}
-
test "Example 552" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[
+ \\ ]
+ \\
+ \\[
+ \\ ]: /uri
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\[
\\]
\\[
- \\]:
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\]: /uri
+ , output);
}
-
test "Example 553" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[foo][]
\\
- \\[foo]:
-);
- const html = (
- \\
+ , output);
}
-
test "Example 554" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[*foo* bar][]
+ \\
+ \\[*foo* bar]: /url "title"
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[*foo*
-);
- const html = (
- \\
+ , output);
}
-
test "Example 555" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[Foo][]
\\
- \\[foo]:
-);
- const html = (
- \\
+ , output);
}
-
test "Example 556" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[foo]
+ \\[]
+ \\
+ \\[foo]: /url "title"
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[foo]
-);
- const html = (
- \\foo
+ \\[]
+ , output);
}
-
test "Example 557" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[foo]
\\
- \\[foo]:
-);
- const html = (
- \\
+ , output);
}
-
test "Example 558" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[*foo* bar]
+ \\
+ \\[*foo* bar]: /url "title"
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[*foo*
-);
- const html = (
- \\
+ , output);
}
-
test "Example 559" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[[*foo* bar]]
+ \\
+ \\[*foo* bar]: /url "title"
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[[*foo*
-);
- const html = (
- \\
+ , output);
}
-
test "Example 560" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[[bar [foo]
+ \\
+ \\[foo]: /url
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[[bar
-);
- const html = (
- \\[[bar
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
[[bar foo
+ , output);
}
-
test "Example 561" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[Foo]
\\
- \\[foo]:
-);
- const html = (
- \\
+ , output);
}
-
test "Example 562" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[foo] bar
+ \\
+ \\[foo]: /url
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[foo]
-);
- const html = (
- \\foo bar
+ , output);
}
-
test "Example 563" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\\[foo]
\\
- \\[foo]:
-);
- const html = (
+ \\[foo]: /url "title"
+ );
+ defer std.testing.allocator.free(output);
+
+ try std.testing.expectEqualStrings(
\\[foo]
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 564" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[foo*]: /url
+ \\
+ \\*[foo*]
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[foo*]:
-);
- const html = (
- \\
+ , output);
}
-
test "Example 565" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[foo][bar]
\\
- \\[foo]:
-);
- const html = (
- \\
+ , output);
}
-
test "Example 566" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[foo][]
\\
- \\[foo]:
-);
- const html = (
- \\
+ , output);
}
-
test "Example 567" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[foo]()
\\
- \\[foo]:
-);
- const html = (
- \\
+ , output);
}
-
test "Example 568" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\[foo](not a link)
+ \\
+ \\[foo]: /url1
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\[foo](not
-);
- const html = (
- \\foo(not a link)
+ , output);
}
-
test "Example 569" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[foo][bar][baz]
\\
- \\[baz]:
-);
- const html = (
- \\
+ , output);
}
-
test "Example 570" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[foo][bar][baz]
\\
- \\[baz]:
-);
- const html = (
- \\
+ , output);
}
-
test "Example 571" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\[foo][bar][baz]
\\
- \\[baz]:
-);
- const html = (
- \\
+ , output);
}
-
test "Example 572" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\;
- const html = (
- \\![]()

+ , output);
}
-
test "Example 573" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\![foo *bar*]
+ \\
+ \\[foo *bar*]: train.jpg "train & tracks"
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\![foo
-);
- const html = (
- \\![]()

+ , output);
}
-
test "Example 574" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\](/url2)
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\![foo
-);
- const html = (
- \\![]()

+ , output);
}
-
test "Example 575" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\](/url2)
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\![foo
-);
- const html = (
- \\![]()

+ , output);
}
-
test "Example 576" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\![foo *bar*][]
+ \\
+ \\[foo *bar*]: train.jpg "train & tracks"
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\![foo
-);
- const html = (
- \\![]()

+ , output);
}
-
test "Example 577" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\![foo *bar*][foobar]
+ \\
+ \\[FOOBAR]: train.jpg "train & tracks"
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\![foo
-);
- const html = (
- \\![]()

+ , output);
}
-
test "Example 578" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\![]()

+ , output);
}
-
test "Example 579" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\My 
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\My
-);
- const html = (
- \\My
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
My 
+ , output);
}
-
test "Example 580" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\![foo]()
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\![]()

+ , output);
}
-
test "Example 581" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\![]()

+ , output);
}
-
test "Example 582" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\![foo][bar]
\\
- \\[bar]:
-);
- const html = (
- \\![]()

+ , output);
}
-
test "Example 583" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\![foo][bar]
\\
- \\[BAR]:
-);
- const html = (
- \\![]()

+ , output);
}
-
test "Example 584" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\![foo][]
\\
- \\[foo]:
-);
- const html = (
- \\![]()

+ , output);
}
-
test "Example 585" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\![*foo* bar][]
+ \\
+ \\[*foo* bar]: /url "title"
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\![*foo*
-);
- const html = (
- \\![]()

+ , output);
}
-
test "Example 586" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\![Foo][]
\\
- \\[foo]:
-);
- const html = (
- \\![]()

+ , output);
}
-
test "Example 587" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\![foo]
+ \\[]
+ \\
+ \\[foo]: /url "title"
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\![foo]
-);
- const html = (
- \\![]()
+ \\[]
+ , output);
}
-
test "Example 588" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\![foo]
\\
- \\[foo]:
-);
- const html = (
- \\![]()

+ , output);
}
-
test "Example 589" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\![*foo* bar]
+ \\
+ \\[*foo* bar]: /url "title"
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\![*foo*
-);
- const html = (
- \\![]()

+ , output);
}
-
test "Example 590" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\![[foo]]
\\
- \\[[foo]]:
-);
- const html = (
+ \\[[foo]]: /url "title"
+ );
+ defer std.testing.allocator.free(output);
+
+ try std.testing.expectEqualStrings(
\\![[foo]]
- \\[[foo]]:
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ \\
[[foo]]: /url "title"
+ , output);
}
-
test "Example 591" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\![Foo]
\\
- \\[foo]:
-);
- const html = (
- \\![]()

+ , output);
}
-
test "Example 592" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\!\[foo]
\\
- \\[foo]:
-);
- const html = (
+ \\[foo]: /url "title"
+ );
+ defer std.testing.allocator.free(output);
+
+ try std.testing.expectEqualStrings(
\\![foo]
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 593" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\\![foo]
\\
- \\[foo]:
-);
- const html = (
- \\
+ , output);
}
-
test "Example 594" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 595" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\https://foo.bar.baz/test?q=hello&id=22&boolean
+ , output);
}
-
test "Example 596" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 597" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 598" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 599" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 600" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 601" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 602" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\<https://foo.bar/baz
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\<https://foo.bar/baz bim>
+ , output);
}
-
test "Example 603" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 604" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 605" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\
+ , output);
}
-
test "Example 606" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\<foo+@bar.example.com>
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 607" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\<>
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\<>
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 608" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\< https://foo.bar >
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\<
-);
- const html = (
- \\<
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
< https://foo.bar >
+ , output);
}
-
test "Example 609" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\<m:abc>
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 610" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\<foo.bar.baz>
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 611" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\https://example.com
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\https://example.com
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 612" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\foo@bar.example.com
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo@bar.example.com
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 613" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 614" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 615" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\
+ , output);
}
-
test "Example 616" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\
+ , output);
}
-
test "Example 617" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\Foo
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\Foo
-);
- const html = (
- \\Foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
Foo
+ , output);
}
-
test "Example 618" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\<33> <__>
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\<33>
-);
- const html = (
- \\<33>
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
<33> <__>
+ , output);
}
-
test "Example 619" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\<a
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\<a h*#ref="hi">
+ , output);
}
-
test "Example 620" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\<
+ \\foo>
+ \\
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\<
-);
- const html = (
- \\<
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
< a><
+ \\foo><bar/ >
+ \\<foo bar=baz
+ \\bim!bop />
+ , output);
}
-
test "Example 622" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\<a
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\<a href='bar'title=title>
+ , output);
}
-
test "Example 623" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\
+ , output);
}
-
test "Example 624" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\</a
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\</a href="foo">
+ , output);
}
-
test "Example 625" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\foo
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
foo
+ , output);
}
-
test "Example 626" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\foo foo -->
+ \\
+ \\foo foo -->
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
foo foo -->
+ \\foo foo -->
+ , output);
}
-
test "Example 627" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\foo
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
foo
+ , output);
}
-
test "Example 628" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\foo
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
foo
+ , output);
}
-
test "Example 629" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\foo &<]]>
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
foo &<]]>
+ , output);
}
-
test "Example 630" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\foo
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
+ , output);
}
-
test "Example 631" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\foo
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\foo
-);
- const html = (
- \\foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
+ , output);
}
-
test "Example 632" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\<a
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\<a href=""">
+ , output);
}
-
test "Example 633" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\foo
+ \\baz
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\foo
-);
- const html = (
- \\foo
foo
+ \\baz
+ , output);
}
-
test "Example 634" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\foo\
\\baz
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\foo
foo
+ \\baz
+ , output);
}
-
test "Example 635" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\foo
+ \\baz
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\foo
-);
- const html = (
- \\foo
foo
+ \\baz
+ , output);
}
-
test "Example 636" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\foo
+ \\ bar
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\foo
-);
- const html = (
- \\foo
foo
+ \\bar
+ , output);
}
-
test "Example 637" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\foo\
+ \\ bar
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\foo
foo
+ \\bar
+ , output);
}
-
test "Example 638" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\*foo
+ \\bar*
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\*foo
-);
- const html = (
- \\foo
foo
+ \\bar
+ , output);
}
-
test "Example 639" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\*foo\
\\bar*
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\foo
foo
+ \\bar
+ , output);
}
-
test "Example 640" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\`code
+ \\span`
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\`code
-);
- const html = (
- \\code
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\code span
+ , output);
}
-
test "Example 641" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\`code\
\\span`
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
- \\code\
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\code\ span
+ , output);
}
-
test "Example 642" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\
+ , output);
}
-
test "Example 643" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\
+ , output);
}
-
test "Example 644" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\foo\
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 645" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\foo
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\foo
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 646" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\### foo\
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\###
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo\
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 647" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\### foo
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\###
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 648" {
- const alloc = std.testing.allocator;
-
- const md = (
+ const output = try convert(std.testing.allocator,
\\foo
\\baz
+ );
+ defer std.testing.allocator.free(output);
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo
\\baz
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 649" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\foo
+ \\ baz
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\foo
-);
- const html = (
+ try std.testing.expectEqualStrings(
\\foo
\\baz
-
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ , output);
}
-
test "Example 650" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\hello $.;'there
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\hello
-);
- const html = (
- \\hello
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
hello $.;'there
+ , output);
}
-
test "Example 651" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\Foo χρῆν
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\Foo
-);
- const html = (
- \\Foo
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
Foo χρῆν
+ , output);
}
-
test "Example 652" {
- const alloc = std.testing.allocator;
+ const output = try convert(std.testing.allocator,
+ \\Multiple spaces
+ );
+ defer std.testing.allocator.free(output);
- const md = (
- \\Multiple
-);
- const html = (
- \\Multiple
-);
-
- const output = try convert(alloc, md);
- defer alloc.free(output);
-
- try std.testing.expectEqualStrings(html, output);
+ try std.testing.expectEqualStrings(
+ \\
Multiple spaces
+ , output);
}
-