You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Autodoc: empty lines are being rendered after the each docstring line in the source code page #21360
/// Appends the new subcommand to the list of subcommands.////// ## Examples////// ```zig/// var app = App.init(allocator, "myapp", "My app description");/// defer app.deinit();////// var root = app.rootCommand();////// var test = app.createCommand("test", "Run test");/// try test.addArg(Arg.positional("FILE", null, null));////// try root.addSubcommand(test);/// ```pubfnaddSubcommand(self: *Command, new_subcommand: Command) !void { ... }
This is what the source code of it looks like in the source page:
Can't reproduce on 0.14.0-dev.1513+de8cece6e with zig build-exe a.zig -femit-docs:
/// Appends the new subcommand to the list of subcommands.////// ## Examples////// ```zig/// var app = App.init(allocator, "myapp", "My app description");/// defer app.deinit();////// var root = app.rootCommand();////// var test = app.createCommand("test", "Run test");/// try test.addArg(Arg.positional("FILE", null, null));////// try root.addSubcommand(test);/// ```pubfnmain() void {
}
Activity
Vexu commentedon Sep 9, 2024
Can't reproduce on
0.14.0-dev.1513+de8cece6ewithzig build-exe a.zig -femit-docs:prajwalch commentedon Sep 9, 2024
Uh, let me try one more time. By the way, which OS are you on?
Update: Got the same result. I am generating docs with
zig test src/lib.zigand this is whatlib.zigcontains.Update: I am on Windows.
Vexu commentedon Sep 9, 2024
Does it reproduce on the snippet I gave? And I'm on Linux.
prajwalch commentedon Sep 9, 2024
It doesn't.
Update: Also, the issue #21358 is not reproduced on the snippet you gave it to me.
pfgithub commentedon Sep 9, 2024
Both issues reproduce for me if carriage returns are inserted before every newline
prajwalch commentedon Sep 10, 2024
Yes! Changing the CRLF to LF solves the problem.
std.zig.tokenizer: simplify line-based tokens
std.zig.tokenizer: simplify line-based tokens