zig fmt: fix extra space after comma before multi line string
This commit is contained in:
@@ -1,3 +1,14 @@
|
||||
test "zig fmt: 2nd arg multiline string" {
|
||||
try testCanonical(
|
||||
\\comptime {
|
||||
\\ cases.addAsm("hello world linux x86_64",
|
||||
\\ \\.text
|
||||
\\ , "Hello, world!\n");
|
||||
\\}
|
||||
\\
|
||||
);
|
||||
}
|
||||
|
||||
test "zig fmt: if condition wraps" {
|
||||
try testTransform(
|
||||
\\comptime {
|
||||
|
||||
@@ -1733,6 +1733,8 @@ fn renderToken(tree: &ast.Tree, stream: var, token_index: ast.TokenIndex, indent
|
||||
}
|
||||
},
|
||||
Space.Space, Space.SpaceOrOutdent => {
|
||||
if (next_token.id == Token.Id.MultilineStringLiteralLine)
|
||||
return;
|
||||
try stream.writeByte(' ');
|
||||
return;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user