Skip to content

Conversation

@skewb1k
Copy link
Contributor

@skewb1k skewb1k commented Nov 3, 2025

68d2f68 introduced special handling for StructInit fields containing multiline strings to prevent inserting whitespace after =. However, this logic didn't handle cases without a trailing comma, which resulted in unwanted trailing whitespace.

test {
    _ = .{
        .field =
        \\this is fine
        ,
    };
    _ = .{ .field = 
        \\         ^ trailing whitespace here
    };
}

68d2f68 introduced special handling for StructInit fields
containing multiline strings to prevent inserting whitespace after =.
However, this logic didn't handle cases without a trailing comma,
which resulted in unwanted trailing whitespace.
@skewb1k skewb1k force-pushed the zig-fmt/trailspaces branch from ddfe03f to 76dacc3 Compare November 3, 2025 13:29
@skewb1k
Copy link
Contributor Author

skewb1k commented Nov 3, 2025

Two source files were affected; rerun zig fmt.

@Vexu Vexu merged commit 26db54d into ziglang:master Nov 5, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants