fn startCodeBlock(p: *Parser, unindented_line: []const u8) !?CodeBlockStart
fn startCodeBlock(p: *Parser, unindented_line: []const u8) !?CodeBlockStart { var fence_len: usize = 0; const tag_bytes = for (unindented_line, 0..) |c, i| { switch (c) { '`' => fence_len += 1, else => break unindented_line[i..], } } else ""; // Code block tags may not contain backticks, since that would create // potential confusion with inline code spans. if (fence_len < 3 or mem.indexOfScalar(u8, tag_bytes, '`') != null) return null; return .{ .tag = try p.addString(mem.trim(u8, tag_bytes, " ")), .fence_len = fence_len, }; }