diff --git a/examples.py b/examples.py index 2dba682..b1bc98a 100644 --- a/examples.py +++ b/examples.py @@ -38,6 +38,9 @@ for example in sel.css('.example'): md = ''.join(example.css('.language-markdown *::text').getall()) html = ''.join(example.css('.language-html *::text').getall()) + md = md.replace('→', ' ') + html = html.replace('→', ' ') + assert name is not None write(f''' diff --git a/src/examples.zig b/src/examples.zig index ddac4f4..d7e6664 100644 --- a/src/examples.zig +++ b/src/examples.zig @@ -6,38 +6,38 @@ const convert = @import("main.zig").convert; test "Example 1" { const output = try convert(std.testing.allocator, - \\→foo→baz→→bim + \\ foo baz bim ); defer std.testing.allocator.free(output); try std.testing.expectEqualStrings( - \\
foo→baz→→bim
+        \\
foo    baz        bim
         \\
, output); } test "Example 2" { const output = try convert(std.testing.allocator, - \\ →foo→baz→→bim + \\ foo baz bim ); defer std.testing.allocator.free(output); try std.testing.expectEqualStrings( - \\
foo→baz→→bim
+        \\
foo    baz        bim
         \\
, output); } test "Example 3" { const output = try convert(std.testing.allocator, - \\ a→a - \\ ὐ→a + \\ a a + \\ ὐ a ); defer std.testing.allocator.free(output); try std.testing.expectEqualStrings( - \\
a→a
-        \\ὐ→a
+        \\
a    a
+        \\ὐ    a
         \\
, output); } @@ -46,7 +46,7 @@ test "Example 4" { const output = try convert(std.testing.allocator, \\ - foo \\ - \\→bar + \\ bar ); defer std.testing.allocator.free(output); @@ -64,7 +64,7 @@ test "Example 5" { const output = try convert(std.testing.allocator, \\- foo \\ - \\→→bar + \\ bar ); defer std.testing.allocator.free(output); @@ -81,7 +81,7 @@ test "Example 5" { test "Example 6" { const output = try convert(std.testing.allocator, - \\>→→foo + \\> foo ); defer std.testing.allocator.free(output); @@ -95,7 +95,7 @@ test "Example 6" { test "Example 7" { const output = try convert(std.testing.allocator, - \\-→→foo + \\- foo ); defer std.testing.allocator.free(output); @@ -112,7 +112,7 @@ test "Example 7" { test "Example 8" { const output = try convert(std.testing.allocator, \\ foo - \\→bar + \\ bar ); defer std.testing.allocator.free(output); @@ -127,7 +127,7 @@ test "Example 9" { const output = try convert(std.testing.allocator, \\ - foo \\ - bar - \\→ - baz + \\ - baz ); defer std.testing.allocator.free(output); @@ -148,7 +148,7 @@ test "Example 9" { test "Example 10" { const output = try convert(std.testing.allocator, - \\#→Foo + \\# Foo ); defer std.testing.allocator.free(output); @@ -159,7 +159,7 @@ test "Example 10" { test "Example 11" { const output = try convert(std.testing.allocator, - \\*→*→*→ + \\* * * ); defer std.testing.allocator.free(output); @@ -181,12 +181,12 @@ test "Example 12" { test "Example 13" { const output = try convert(std.testing.allocator, - \\\→\A\a\ \3\φ\« + \\\ \A\a\ \3\φ\« ); defer std.testing.allocator.free(output); try std.testing.expectEqualStrings( - \\

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

+ \\

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

, output); } @@ -535,7 +535,7 @@ test "Example 40" { defer std.testing.allocator.free(output); try std.testing.expectEqualStrings( - \\

→foo

+ \\

foo

, output); } @@ -1095,7 +1095,7 @@ test "Example 81" { test "Example 82" { const output = try convert(std.testing.allocator, \\ Foo *bar - \\baz*→ + \\baz* \\==== ); defer std.testing.allocator.free(output);