Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing space for build examples #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

matias-santurio
Copy link

@matias-santurio matias-santurio marked this pull request as ready for review November 2, 2024 22:33
@jameschensmith
Copy link

@matias-santurio, I think the better option would to fix the spacing when appending the additional options (e.g., from "{s} " to " {s}"). There's a few of them in doctest.zig, so make sure to fix them all if you do this approach.

            for (code.additional_options) |option| {
                try build_args.append(option);
-               try shell_out.print("{s} ", .{option});
+               try shell_out.print(" {s}", .{option});
            }

@matias-santurio
Copy link
Author

@matias-santurio, I think the better option would to fix the spacing when appending the additional options (e.g., from "{s} " to " {s}"). There's a few of them in doctest.zig, so make sure to fix them all if you do this approach.

            for (code.additional_options) |option| {
                try build_args.append(option);
-               try shell_out.print("{s} ", .{option});
+               try shell_out.print(" {s}", .{option});
            }

Yeah I like that better too, I just tried to do the minimal change possible tbh. If a maintainer prefers it, I can make that change.

@eliasdorneles
Copy link

Will this PR fix this problem in https://ziglang.org/learn/build-system/ ?

image

@eliasdorneles
Copy link

Looks like the same fix proposed already here: #1

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.

Missing a space in the Learn the Zig Build System page
3 participants