╭ changed ───────────────╮ │src/ui/Repo/Markdown.zig│ ╰────────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │235 const marker = if (item.task) |checked| │ │236 (if (checked) "☑ " else "☐ ") │ │237 else if (list.ordered) │ │238 - try std.fmt.allocPrint(b.page_arena.allocator(), "{[n]d:>[w]}. ", .{ .n = list.start + i, .w = number_width })│ │238 + try b.page_arena.allocator().print("{[n]d:>[w]}. ", .{ .n = list.start + i, .w = number_width }) │ │239 else │ │240 "• "; │ │241 const gutter = gutter: { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │248 try put(allocator, box, .{ .box = list_box }); │ │249 }, │ │250 // wider than any pane, and clipped to the width │ │251 - .rule => try put(allocator, box, .{ .text_box = try wgt.TextBox.init(allocator, "─" ** 512, .{ .border_style = null, .wrap_kind = .none, .style = .{ .dim = true } }) }), │ │251 + .rule => try put(allocator, box, .{ .text_box = try wgt.TextBox.init(allocator, std.mem.asBytes(&@as([512]["─".len]u8, @splat("─".*))), .{ .border_style = null, .wrap_kind = .none, .style = .{ .dim = true } }) }),│ │252 .raw => |lines| { │ │253 const text = try std.mem.join(b.page_arena.allocator(), "\n", lines); │ │254 try put(allocator, box, .{ .text_box = try wgt.TextBox.init(allocator, text, .{ .border_style = null, .wrap_kind = .none }) }); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │280 fn resolveLink(b: Builder, dest: []const u8) ![]const u8 { │ │281 const aa = b.page_arena.allocator(); │ │282 for ([_][]const u8{ "http:", "https:", "mailto:" }) |scheme| { │ │283 - if (std.ascii.startsWithIgnoreCase(dest, scheme)) return std.fmt.allocPrint(aa, "{s}{s}", .{ ui.raw_link_prefix, dest });│ │283 + if (std.ascii.startsWithIgnoreCase(dest, scheme)) return aa.print("{s}{s}", .{ ui.raw_link_prefix, dest }); │ │284 } │ │285 if (hasScheme(dest) or std.mem.startsWith(u8, dest, "//")) return ""; │ │286 const data = b.data orelse return ""; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────╮ │305 } │ │306 const path = try std.mem.join(aa, "/", segments.items); │ │307 const route = data.filesRoute(path, 0) orelse return ""; │ │308 - return std.fmt.allocPrint(aa, "a:{s}", .{try route.toUrl(b.page_arena)});│ │308 + return aa.print("a:{s}", .{try route.toUrl(b.page_arena)}); │ │309 } │ │310 }; │ │311 │ ╰──────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │357 │ │358 // the bold fallback leads with the level's #s, so levels stay apart │ │359 const marked = try page_arena.allocator().alloc(RichText.Span, spans.len + 1); │ │360 - marked[0] = .{ .text = try std.fmt.allocPrint(page_arena.allocator(), "{s} ", .{"######"[0..level]}), .style = .{ .bold = true } };│ │360 + marked[0] = .{ .text = try page_arena.allocator().print("{s} ", .{"######"[0..level]}), .style = .{ .bold = true } }; │ │361 @memcpy(marked[1..], spans); │ │362 var text = try RichText.init(allocator, marked); │ │363 errdefer text.deinit(allocator); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯