authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-05-29 03:25:03-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-05-29 03:33:03-04:00
logcd325e408e2d23734ba84e412b6f1706cf442434
treec1ec318cf6c4dac96d1f47ea0fbb58343e401c84
parenteda6898c5b253367174172db909ee23013f32733

zig fmt: fix extra space after comma before multi line string


2 files changed, 13 insertions(+), 0 deletions(-)

std/zig/parser_test.zig+11
......@@ -1,3 +1,14 @@
1test "zig fmt: 2nd arg multiline string" {
2 try testCanonical(
3 \\comptime {
4 \\ cases.addAsm("hello world linux x86_64",
5 \\ \\.text
6 \\ , "Hello, world!\n");
7 \\}
8 \\
9 );
10}
11
112test "zig fmt: if condition wraps" {
213 try testTransform(
314 \\comptime {
std/zig/render.zig+2
......@@ -1733,6 +1733,8 @@ fn renderToken(tree: &ast.Tree, stream: var, token_index: ast.TokenIndex, indent
17331733 }
17341734 },
17351735 Space.Space, Space.SpaceOrOutdent => {
1736 if (next_token.id == Token.Id.MultilineStringLiteralLine)
1737 return;
17361738 try stream.writeByte(' ');
17371739 return;
17381740 },